##Project structure
I think it's important to have a good understanding of what happens under the hood when working with an idea, especially one that is still under heavy development and error prone. I'll show you what Studio does when creating or importing a project.
###New Simple Android Project
###Importing existing Samples
In this section, I'm going to be taking a look at 2 popular sample apps from Google
- Google I/O 2013 scheduler
- Android Map Utils
Both projects are open-source and can be imported in Android Studio.
####ioshed
When an existing Studio project is cloned from a version control system, it typically doesn't contain any Studio/IntelliJ/Gradle generated files. These will be generated by Android Studio during import.
These generated folders/files include
- A
.gradlefolder - A
.ideafolder - A
buildfolder for each module
#####Gradle folder
These are mostly binary files for Gradle... nothing much to see here
#####Idea folder
This folder contains all IntelliJ meta-data about your project. It's mostly generated during the Gradle import
Some files of interest
- Modules file
Android Studio projects can be made up of different modules. There's always 1 top-level module and 1 or more nested modules.
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/android/android.iml" filepath="$PROJECT_DIR$/android/android.iml" />
<module fileurl="file://$PROJECT_DIR$/iosched.iml" filepath="$PROJECT_DIR$/iosched.iml" />
</modules>
</component>
</project>
- iml files
Each module comes with its own .iml file, idea meta-data describing the module
For example the top-level module ioshed looks like this
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
The nested project called android looks like this
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="Debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleTest" />
<option name="SOURCE_GEN_TASK_NAME" value="TODO" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":android" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/exploded-bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android 4.3 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-18.0.0" level="project" />
<orderEntry type="library" exported="" name="basic-http-client-android-0.88" level="project" />
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
<orderEntry type="library" exported="" name="gcm" level="project" />
<orderEntry type="library" exported="" name="google-api-client-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="google-api-client-android-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="google-api-services-googledevelopers-v1-rev20130424-1.14.2-beta" level="project" />
<orderEntry type="library" exported="" name="google-api-services-plus-v1-rev67-1.14.2-beta" level="project" />
<orderEntry type="library" exported="" name="google-http-client-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="google-http-client-android-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="google-http-client-gson-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="google-oauth-client-1.14.1-beta" level="project" />
<orderEntry type="library" exported="" name="gson-2.1" level="project" />
<orderEntry type="library" exported="" name="guava-11.0.1" level="project" />
<orderEntry type="library" exported="" name="jsr305-1.3.9" level="project" />
<orderEntry type="library" exported="" name="libGoogleAnalyticsV2" level="project" />
<orderEntry type="library" exported="" name="protobuf-java-2.2.0" level="project" />
<orderEntry type="library" exported="" name="svg-android" level="project" />
<orderEntry type="library" exported="" name="volley" level="project" />
<orderEntry type="library" exported="" name="YouTubeAndroidPlayerApi" level="project" />
<orderEntry type="library" exported="" name="ComGoogleAndroidGmsPlayServices3159.aar" level="project" />
<orderEntry type="library" exported="" name="ComAndroidSupportAppcompatV71800.aar" level="project" />
</component>
</module>
Each module also has a gradle build file associated with it
#####Build folder
In this particular case, the ioshed main code is located in the android module. It contains all the files generated by the build, including
- compiled class files from our java source folder
- resources (xml files, drawabls,....)
- Exploded library bundles (in this case ComGoogleAndroidGmsPlayServices3159 and ComAndroidSupportAppcompatV71800)
##Project migration
It's fair to say that a large portion of the Android Studio userbase will want to migrate some of its existing projects from Eclipse into the Android Studio. I thought it would be interesting to see how that would work out.
###Migrating existing projects
In this section I'll see how we can migrate projects that were created using Eclipse ADT.
####Simple Eclipse ADT projects
####Mavenized Eclipse ADT projects
##Dependencies
There are multiple ways to add dependencies to your project in Android Studio
Imagine you have an Android Studio Project containing both your Android app (lets call it my-android-app) and a library project (my-library-project) that is used by the app.
In that case the library project sources are included in the same Android Studio Project, so you can add a compile time dependency to your android app like this:
dependencies {
compile project(':my-library-project')
}
Here we're talking about non-library project dependencies. Regular JAR files.
If you create a new project it will already have the support library as a dependency.
dependencies {
compile 'com.android.support:support-v4:18.0.0'
}
This is in fact a Maven dependency (as we'll see later on).
If you want to add other (non-mavenized) JAR files to your projects you can do it in the following ways :
In order to do that, you can simply add the following in your gradle build file.
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile fileTree(dir: 'libs', include: '*.jar')
}
You can add a comma-seperated list of JAR files as well. For example to add the Foursquare API and Google AdMob you would do this (providing they are in the libs folder of your project).
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile files('libs/foursquare-api-1.0.2.jar', 'libs/GoogleAdMobAdsSdk-6.4.1.jar')
}
When creating a new project, your gradle build file is automatically setup to use Maven. In your SDK Manager, you'll most likely have selected the 2 maven repostories to be installed on your filesystem.
This allows you to very easily reference all kinds of third party libraries that are available in Maven central, as well as referencing google libraries like Google Play Services and the ActionBar Compatiblity Library.
To reference Google Play Services you would do this:
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.google.android.gms:play-services:3.1.+'
}
To reference ActionBarSherlock you would do this:
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:13.0.+'
}
Notice that we're using the aar format here. Gradle will download the AAR file from the maven2 central repository or from your local maven repository
http://repo1.maven.org/maven2/com/actionbarsherlock/actionbarsherlock/4.4.0/
And install it in
${PROJECT_HOME}\build\exploded-bundles\ComActionbarsherlockActionbarsherlock440.aar\classes.jar
Other maven dependencies, like for example the support library are fetched from
${SDK_HOME}\extras\android\m2repository\com\android\support\support-v4
These dependencies are stored in
${PROJECT_DIR}/.idea/libraries/ComActionbarsherlockActionbarsherlock440_aar.xml
And it contains this :
<component name="libraryTable">
<library name="ComActionbarsherlockActionbarsherlock440.aar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/build/exploded-bundles/ComActionbarsherlockActionbarsherlock440.aar/classes.jar!/" />
<root url="jar://$PROJECT_DIR$/build/exploded-bundles/ComActionbarsherlockActionbarsherlock440.aar/classes.jar!/" />
<root url="jar://$PROJECT_DIR$/build/exploded-bundles/ComActionbarsherlockActionbarsherlock440.aar/classes.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/actionbarsherlock/actionbarsherlock/4.4.0/actionbarsherlock-4.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>
Unfortunately, although Gradle has excellent dependency support making it a lot easier to reference your third party dependencies, it does have one major drawback at the moment : the fact that it doesn't download sources.
As a workaround for htis I create a pom.xml with all the dependencies and run the dependency:sources goal to download all sources to my local maven repository. (make sure to run clean as it uses the target folder for an internal cache).
$ mvn clean dependency:sources
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building com.ecs.dummy 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ com.ecs.dummy ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom (2 KB at 6.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.pom (4 KB at 58.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/2.0.6/plexus-2.0.6.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/2.0.6/plexus-2.0.6.pom (17 KB at 287.2 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar (218 KB at 1567.9 KB/sec)
[INFO] Deleting c:\Projects\Android2\ActionBarSherlock-Gradle-Sample\target
[INFO]
[INFO] --- maven-dependency-plugin:2.1:sources (default-cli) @ com.ecs.dummy ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.actionbarsherlock:actionbarsherlock:java-source:sources:4.4.0
[INFO] com.google.android:support-v4:java-source:sources:r7
[INFO] com.google.guava:guava:java-source:sources:14.0.1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.749s
[INFO] Finished at: Sat Aug 24 19:05:23 CEST 2013
[INFO] Final Memory: 10M/151M
[INFO] ------------------------------------------------------------------------
##Errors occured
Graphical layout editing in Android Studio .... what can I say ... needs a lot of work.
For creating layouts it's very unintuitive. IT constantly makes you redefine whatever you thought you knew about drag and drop. (just put a gridlayout with 2 text elements on screen and start dragging them around. You'll see what I mean)
For previewing layouts : I opened the IO2013 iosched app and I couldn't preview a single layout (either it showed up blank or it produced a rendering error).
So I was wondering if and how people are using this feature ? In XCode the layout editing was a joy to use. You rarely needed to manually fiddle in the layout files, everything could be handled through drag and drop. Here it is frustrating to say the least.
Probably some file-locking issue on Windows causes an issue while cleaning a project (first phase of a build typically). For some reason I didn't notice this at all in the IDE and just kept on launching the project in the emulator. Obviously I didn't see my code-changes as the project was never built.
This error was hidden away somewhere in the logs:
2013-08-22 00:17:49,878 [7789112] INFO - figurations.GeneralCommandLine - Working directory: C:\SOFT\android-studio\system\compile-server
2013-08-22 00:17:49,878 [7789112] INFO - figurations.GeneralCommandLine - Environment: {ProgramData=C:\ProgramData, USERPROFILE=C:\Users\Corei5Amt, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, JAVA_HOME=C:\SOFT\jdk1.7.0_25, ProgramFiles(x86)=C:\Program Files (x86), SystemDrive=C:, TEMP=C:\Users\COREI5~1\AppData\Local\Temp, ProgramFiles=C:\Program Files, Path=C:\SOFT\Python33\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\TortoiseSVN\bin';C:\SOFT\jdk1.7.0_25\bin;C:\SOFT\apache-maven-3.0.5\bin, HOMEDRIVE=C:, PROCESSOR_REVISION=3a09, USERDOMAIN=Corei5Amt-PC, ALLUSERSPROFILE=C:\ProgramData, VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\, ProgramW6432=C:\Program Files, PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel, SESSIONNAME=Console, TMP=C:\Users\COREI5~1\AppData\Local\Temp, PROCESSOR_ARCHITECTURE=AMD64, LOGONSERVER=\\COREI5AMT-PC, =::=::\, CommonProgramFiles=C:\Program Files\Common Files, OS=Windows_NT, FP_NO_HOST_CHECK=NO, HOMEPATH=\Users\Corei5Amt, PROCESSOR_LEVEL=6, CommonProgramW6432=C:\Program Files\Common Files, LOCALAPPDATA=C:\Users\Corei5Amt\AppData\Local, COMPUTERNAME=COREI5AMT-PC, SystemRoot=C:\Windows, windir=C:\Windows, NUMBER_OF_PROCESSORS=4, PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\, PUBLIC=C:\Users\Public, USERNAME=Corei5Amt, ANDROID_HOME=C:\SOFT\adt-bundle-windows-x86_64-20130729\sdk, CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files, ComSpec=C:\Windows\system32\cmd.exe, APPDATA=C:\Users\Corei5Amt\AppData\Roaming}
2013-08-22 00:17:50,079 [7789313] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /C:/SOFT/android-studio/lib/optimizedFileManager.jar;C:/SOFT/android-studio/lib/jna.jar;C:/SOFT/android-studio/lib/log4j.jar;C:/SOFT/android-studio/lib/picocontainer.jar;/C:/SOFT/android-studio/lib/jgoodies-forms.jar;/C:/SOFT/android-studio/lib/netty-3.6.6.Final.jar;/C:/SOFT/android-studio/lib/openapi.jar;C:/SOFT/android-studio/lib/oromatcher.jar;/C:/SOFT/android-studio/lib/protobuf-2.5.0.jar;/C:/SOFT/android-studio/lib/jps-server.jar;/C:/SOFT/android-studio/lib/forms_rt.jar;/C:/SOFT/android-studio/lib/nanoxml-2.2.3.jar;/C:/SOFT/android-studio/lib/idea_rt.jar;/C:/SOFT/android-studio/lib/ecj-4.2.1.jar;C:/SOFT/android-studio/lib/jdom.jar;/C:/SOFT/android-studio/lib/idea.jar;C:/SOFT/android-studio/lib/resources_en.jar;C:/SOFT/android-studio/lib/util.jar;C:/SOFT/android-studio/lib/jna-utils.jar;C:/SOFT/android-studio/lib/trove4j.jar;/C:/SOFT/android-studio/lib/asm4-all.jar;C:/SOFT/android-studio/lib/annotations.jar;C:/SOFT/jdk1.7.0_25/lib/tools.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle-base-services-1.7.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle-core-1.7.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle-messaging-1.7.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle-tooling-api-1.7.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle-wrapper-1.7.jar;C:/SOFT/android-studio/plugins/gradle/lib/gradle.jar;C:/SOFT/android-studio/plugins/gradle/lib/guava-11.0.2.jar;C:/SOFT/android-studio/plugins/gradle/lib/jsr305-1.3.9.jar;C:/SOFT/android-studio/plugins/gradle/lib/resources_en.jar;C:/SOFT/android-studio/plugins/gradle/lib/slf4j-api-1.7.2.jar;C:/SOFT/android-studio/plugins/gradle/lib/slf4j-simple-1.7.2.jar;C:/SOFT/android-studio/plugins/IntelliLang/lib/intellilang-jps-plugin.jar;C:/SOFT/android-studio/plugins/Groovy/lib/groovy-jps-plugin.jar;C:/SOFT/android-studio/plugins/maven/lib/maven-jps-plugin.jar;C:/SOFT/android-studio/plugins/maven/lib/maven3/plexus-utils-2.0.6.jar;C:/SOFT/android-studio/plugins/android/lib/jps/android-jps-plugin.jar;C:/SOFT/android-studio/plugins/android/lib/jps/android-gradle-jps.jar;C:/SOFT/android-studio/plugins/android/lib/android-common.jar;C:/SOFT/android-studio/plugins/android/lib/android-rt.jar;C:/SOFT/android-studio/plugins/android/lib/sdklib.jar;C:/SOFT/android-studio/plugins/android/lib/guava-13.0.1.jar;C:/SOFT/android-studio/plugins/android/lib/common.jar;C:/SOFT/android-studio/plugins/android/lib/jarutils.jar;C:/SOFT/android-studio/plugins/android/lib/layoutlib-api.jar;C:/SOFT/android-studio/plugins/android/lib/manifest-merger.jar
2013-08-22 00:17:50,693 [7789927] INFO - api.vfs.impl.local.FileWatcher - Change requests:52224, filtered:24244
2013-08-22 00:17:50,906 [7790140] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 00:17:50.902 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Tooling API provider 1.6 created.
2013-08-22 00:17:51,012 [7790246] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: 00:17:51.008 [Connection worker] DEBUG o.g.t.i.provider.ProviderConnection - Configuring logging to level: INFO
2013-08-22 00:17:51,028 [7790262] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Tooling API uses target gradle version: 1.6.
2013-08-22 00:17:51,234 [7790468] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Connected to the daemon. Dispatching Build{id=e1582a4c-5372-459a-a556-588cd658b3c8.1, currentDir=C:\SOFT\android-studio\system\compile-server} request.
2013-08-22 00:17:51,881 [7791115] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
2013-08-22 00:17:52,475 [7791709] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: :android:clean
2013-08-22 00:17:52,706 [7791940] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: FAILED
2013-08-22 00:17:52,706 [7791940] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: FAILURE: Build failed with an exception.
2013-08-22 00:17:52,706 [7791940] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: * What went wrong:
2013-08-22 00:17:52,707 [7791941] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: Execution failed for task ':android:clean'.
2013-08-22 00:17:52,708 [7791942] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: > Unable to delete file: C:\Projects\Android\iosched\android\build\exploded-bundles\ComAndroidSupportAppcompatV71800.aar\classes.jar
2013-08-22 00:17:52,709 [7791943] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: * Try:
2013-08-22 00:17:52,710 [7791944] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
2013-08-22 00:17:52,712 [7791946] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: BUILD FAILED
2013-08-22 00:17:52,712 [7791946] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Total time: 1.921 secs
Although this worked
compile 'com.google.android.gms:play-services:3.1.36+'
#Issues logged
- https://code.google.com/p/android/issues/detail?id=59285
- https://code.google.com/p/android/issues/detail?id=59284
- https://code.google.com/p/android/issues/detail?id=59283
- https://code.google.com/p/android/issues/detail?id=59255
- https://code.google.com/p/android/issues/detail?id=59251
- https://code.google.com/p/android/issues/detail?id=59248
- https://code.google.com/p/android/issues/detail?id=59220
- https://code.google.com/p/android/issues/detail?id=59219
#References



