In Android Studio 1.2 Preview 1 & 2, selecting "Update & Restart" to update from one version to the next, does not actually restart. Just manually exit the IDE, and start it again. Once you do that, the patch will be installed and the IDE updated.
There was a bug in the find_java.bat command that shipped with SDK Tools 24.0.0. This was fixed in version 24.0.1, but unfortunately, that command is used on some systems to launch the SDK Manager itself.
If you are unable to launch the SDK Manager to update, you can download find_java.zip from this page, and unzip it into the root of your Android SDK installation; it will replace the files
(If you are using Android Studio 1.0.1, the IDE will prompt you to update to tools 24.0.1 which it will do inside the IDE, so that update should work without needing to call
If you are updating from Android Studio 0.8.x to Android Studio 1.0.0-RC, you'll need to update your Gradle plugin version from 0.13.x to 1.0.0-rc4. There were a couple of last minute API changes; for example, change "runProguard" to "minifyEnabled", etc. See the release notes under http://tools.android.com/tech-docs/new-build-system for more details on the changes if you run into build/Gradle sync issues.
Please see the migration document.
If your build fails with an error message like this:
you are using an obsolete version of the Android support libraries. Open up the SDK manager and update to the latest (non-preview) versions.
When updating to version 0.8.13 or newer, the patch installation may detect the Android SDK folder inside your application folder. If this occurs, you must move your sdk folder outside of the application folder for the update to take place. Once Android Studio is updated, on its first run it will ask you for the location of the sdk. Projects that were referencing the old sdk location will be automatically updated once opened in Android Studio. We do not recommend moving the sdk directory back into Android Studio as this would interfere with the application signature, particularly on MacOS, and would prevent future updates to do verifications and avoid corrupted installations. More information in issue 78129.
To move the SDK folder in Windows or Linux, simply go to Android Studio's folder and drag the "sdk" folder to another location, such us your user directory or alongside Android Studio's folder. On MacOS go with Finder to the application folder called "Android Studio.app", right click on it and select "Show Package Contents". When its contents are shown you can now drag the "sdk" folder to its new location.
(We have some additional information and screenshots for this in Android Studio 0.8.14 in Beta Channel).
Issue: If you have specific resource folders in your Java modules, then those resources won't be found when running tests from the IDE. Running tests using Gradle from the command line will work. Executing the gradle check task from the IDE will also work. See Issue 64887 for more details.
This issue happens because as of IntelliJ 13, you can only have a single folder as the classpath. IntelliJ's builder copies all resources into that build folder. But Gradle doesn't copy over the resources.
You can use any of the following workarounds until then:
- Run the gradle check task from the IDE rather than running a unit test
- Or update your build script to manually copy resources into the build folder. See comment #13.
When creating a new project, the template JUnit configuration may be created with two "Before launch" steps: Make and Gradle-aware Make. This is then propagated to all created JUnit run configurations. To fix the issue, go to Run -> Edit Configurations and change the default JUnit configuration to only include the Gradle-aware Make step. To fix this for all future projects, close the current project (File -> Close Project) to get to the welcome screen, select Configure -> Project Defaults -> Run Configurations and make the same change.
In Android Studio 0.8.3+:
Studio 0.8.3 does not work properly on Linux with the "Awesome WM" window manager version 3.4. It's supposed to work with 3.5.
On Windows, files that are in use by a process cannot be deleted.
When you attempt to use the builtin update mechanism in the IDE, it sometimes refuses to install the update, usually providing an error message like "Can't delete C:\some\path\file".
To work around this, open the task manager and attempt to kill processes that may be using the file, such as any gradle daemons.
Google Play Services 5.0.77
If your builds suddenly stop working with this error message:
Error: Failed to find: com.google.android.gms:play-services:5.0.77
this is caused by the play services artifact being removed from the local Google Maven repository because it contained some critical bugs. It was been replaced by version 5.0.89 instead. (More information)
(This issue is fixed in Android Studio 0.8.6)
A new version of the Google Play Services library was released recently: 5.2.08. If you are using an older version of the library, Android Studio will automatically offer to upgrade it to the new version. However, due to a bug, it drops the leading zero in "08", which means it replaces the dependency with "5.2.8" instead of "5.2.08" which does not work. To fix this, edit the dependency to read "5.2.08" instead of "5.2.8". (More information).