- To set up your development environment on Windows, you'll need to install the Java development kit from Oracle, and Android studio with the Android SDK. If you don't already have the Java Development Kit installed, you can download it for free from java.oracle.com. From here, go to Java SE under top downloads, then to the JDK download. Select the appropriate version for your copy of Windows. The S86 version is for Windows 32 bit, and S64 is for 64 bit Windows.
Follow all the installation instructions and make sure you install both the JDK and the Java run time, or JRE. Then, go to your disk and find out where you've installed it. I'm using the most recent version of Java as of this recording, and it was installed in C:\ProgramFiles\Java\ and then JDK and the version number. I'm going to click in there and then click into the address bar and then copy that string to the clipboard.
Now I'm going to go check a couple of things in my environment variables. I'll go to the control panel and I'll type the beginning of environment, and then I'll click edit the system environment variables. Then I'll click environment variables and then I'll go to the PATH setting. Notice that I've already added my bin folder under my JDK folder to my PATH. This will allow my to call all of the commands from the bin folder no matter where I am on my file system.
I'll test that by going to a command prompt. I'll type java-version and I see that I'm running version 1.8 update 65. I'll also check the availability of the Java compiler with javac-version, and once again I see the same version. In addition to setting the PATH, before you install Android studio, you should also set a variable named java_home.
This is set to the location of your JDK, not the bin subfolder. It's not always needed, but it doesn't hurt to set this up. So now you have the two environment variables you need. The PATH, and Java home, and you're ready to install Android studio and the SDK. You can download all that software from the URL d.android.com, or developer.android.com. From the home page, click Develop, and then Tools.
And you can download the Android Studio installer. This will contain the studio application and also the first parts of the Android SDK. I've already downloaded that to my desktop and I'll start it up. There are only a few options you need to pay attention to. If you see a user account control dialog, click Yes, then click through the Welcome screen. I recommend selecting all three options here. To install the Android SDK, create a first android virtual device and install the Intel HAXM software that speeds up the Android emulator.
On the next couple of screens, you'll be asked to agree to a couple of license agreements. Next, set your installation locations. I usually accept the default location for Android Studio, but then I like to change the location of the SDK to a folder named Android under my home directory. That makes it a little bit easier to get to, and it doesn't affect the functionality at all. On the next screen, I'm asked how much RAM to allocate to the Intel HAXM software.
Each virtual device will need somewhere between 512 megabytes, and one and a half gigabytes. So, if I want to run more than one device at a time, I might need more than two gigabytes allocated to this software. My computer has plenty of RAM, so I'm not concerned about allocating more, so I'll set it to three gigabytes. If you're running a computer with less RAM, say only eight gigabytes, you might leave it at two. And then, I can complete the installation.
The installation will take quite a while because it's going to install everything from the executable, but it's also going to download some content from the web. So be patient and come on back a little bit later once the installation is finished and you'll be asked to go through the next steps installing the SDK. Once you get to this screen, the initial installation is complete, but you're not quite done yet. In the next step, you'll start Android Studio and update the Android SDK.