Google announced during the last Google I/O a new IDE specifically tailored for Android developers, dubbed Android Studio. As for a coming project I will need to develop an Android application, I decided to train myself to this and go directly with this new development environment.
Unfortunately, the set-up has not been straightforward due to some little issues that can easily be avoided. Well, Google warned me, if I did not feel comfortable with this early access preview, I should have used Eclipse, which I had already used for projects (including the full online CS106A course from Stanford). You will find in the next lines a summary of the installation. Have a look at the conclusions directly, if you want the short story.
I will updated this post and use it as a reference if I have to install Android Studio again. Feel free to post your own feedback or share your experience in the comments.
PREREQUISITES
First of all, as IntelliJ IDEA from which Android Studio is forked, is based on Java, you need Java. To install Android Studio, you need specifically Java x64, and of course both JDK and JRE. I have updated my Java set-up page accordingly.
Then you need the download the install bundle which is found on the Android developers official site.
Or download it directly: here
INSTALLATION
You are now ready to run the install executable. Do it.
Step one: detect Java
If Java has been correctly installed, you should have something like:
Well, this message is somehow not clear since the location mentioned is the JRE and not the JDK, but it does not matter. If you only installed the 32 bits version of the JDK, you pass through this step, and of course it will not work at the end.
So once again, be very sure that you have the x64 of Java on your computer.
The Android Studio page suggests you to define the JAVA_HOME environment variable, this should not be necessary if you have Java x64. Moreover I rather like to keep it like it is currenlty, since I may use it elsewhere and I do not want to run all .jar with the x64 version. You never know.
Step two: users scope
The choice looks trivial, but it is not. If you choose to install Android Studio for all users, it will fail afterwards. Some files need to be modified, and as they have been installed into administrator’s folders, you will face authorization issues and the following message: “Files in C:\Program Files (x86)\Android\android-studio\system\caches are locked. Android Studio will not be able to start”. Pretty bad. The SDK update or install from a regular user will also fail.
So I strongly suggest to select an installation for the local user only.
Step three: import settings
As it is a first installation, you shouldn’t have any settings to import. This chapter may be updated for a next installation.
Step four: USB drivers to run app on your phone
It looks like this step is no longer required. When you plug your phone in your computer and activate the “debug mode”, the drivers is automatically updated by Windows 7. And that works.
Note: since the 4.2 version of Android, the developer menu is hidden behind 7 taps on the Build number (in the About phone menu).
FIRE-UP ANDROID STUDIO
Admire the nice Android look and feel of the splash screen:
Before creating your first project, take time to update your fresh new IDE. By default, the theme is white. It is not the theme used for the I/O keynote neither the developer site screenshots. Go to File / Settings, from there to IDE Settings / Appearance, and finally select “Darcula”. Enjoy!
CONCLUSIONS
Just keep in mind the two following advice:
- advice #1: be sure to have Java x64, the installer will not warn you
- advice #2: install the IDE for the local user only
And you should not loose two hours on Sunday afternoon like me to be ready to code your first app!
As suggested in the introduction, any comments are welcome.
The post Setting up the Android Studio development environment on Windows 7 [periodically updated] appeared first on Zombie Brainz' Juice.