In this post, we look at the steps required to run Android Studio on Windows 10. My main reason to do so is to build some simple apps and to also try to use JRuby on Android with the Ruboto project.
Installing Android Studio on Windows is not complicated. For most part, it works without anything special needed.
As in many of my Day 0 guides, we start simply doing a download, install and running the simplest of the projects to know that things are wired up. We will:
- Download and install Android Studio on Windows
- Run it and create a simple project
- Run the app on the emulator and a device
Before we get started
A full Android Studio installation will take approximately 1.6GB of disk space. I recommend that you set the folder to be compressed automatically by Windows so that it saves you space. This becomes important especially on SSDs where the space might be limited to start with anyway.
You can do this step after you finish the installation but it takes much longer than doing it now when the folder is empty so that Windows will automatically compress the files on the fly as they get written to the directory as part of the installation.See the page on Installing Ruby 3.0 on Windows on how to do this.
Download and install Android Studio
Head on over to the Android Studio site and grab the package for Windows. It’s a big download (almost 900MB).
At this point, you will need to read and accept the license and click Next.
Installation
Double click on the downloaded file and let it start the installation. This goes through a few steps and you’re better off leaving the defaults in place.
In this step, it asks you where to install Android Studio. If you have enough space on C Drive, you can leave it as it is; if not, change the path.
Finally it’s done! You can now ask the installer to launch Android Studio.
The first time it starts, it asks you if you want to import existing settings – since this is a clean installation, we choose to import nothing and click on OK.
Configuring Android Studio
We are now ready to get started. We start Android Studio.
Even though we have come to the Welcome screen, it prompts us that there are plugin updates available – we haven’t yet got started, so it’s a good time to Update before we get going. Once done, we are asked if Android Studio can restart. We let it.
Next up, it asks for where to find the Java Runtime Environment (JRE). We can point this to a different installation of JRE on our PC, but for now, we leave it as it is. We can change that later if we want.
On the next step, we choose which components to install. It’s easiest to choose everything, especially because it’s common to use the emulator while developing.
Talking about the emulator, it’s time to configure it now. If you don’t have enough RAM, bring down the number to a smaller value (e.g. 2GB). For most cases, if you can afford it, leave it at 4GB.
Last chance – take a look at the configuration and additional setup, and click finish.
It will do some more work and download some more things and you just have to wait it out.
…and finally, we are done!
Starting up
We can finally get started! We select to create a new project.
Select the Basic Activity type of application that creates a simple applictaion with just enough code to be runnable.
On the next page, we fill in information about our app. I filled in the details as below
After a bit, the editor window comes up with some code already filled in.
You can now run the application by clicking on either the run icon or the debug icon.
This will launch the emulator and show the simple app already running in it!
OK, so everything is wired up. You can now connect a mobile device using USB. Choose the mobile device from the run menu and run/ debug the application. It will start up on the device now. If this does not work properly, you might need to check if Developer mode is enabled on your device.
What’s next?
That’s up to you. There are lots of tutorials on the web or on YouTube. You could also get started here: https://developer.android.com/training/basics/firstapp/creating-project
There’s also this which has additional details on programming with Kotlin if you want to go down that path: https://developer.android.com/courses/android-basics-kotlin/course
OK, so we have done enough for Day 0 – we finally have everything running and ready for more! If you have any comments, please leave them below so that we can improve this page.