I'm using Android Studio 1.0.2 and Gradle. The gradlew command compileDebugJava runs just fine, but when I run compileDebug the building process gets stuck to app:preDexDebug. When I run the command from Windows command prompt, I can see that processing the step always goes 78% through before freezing. No error messages. It just gets stuck.
Please request more information if needed as I haven't provided it just because I don't know what's useful.
Before I changed my target Android API from 19 to 21 and slightly changed my dependancies. These are my current dependancies:
dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'ch.acra:acra:4.5.0'
compile 'com.google.android.gms:play-services-games:6.5.87'
compile 'com.google.android.gms:play-services-plus:6.5.87'
compile 'com.google.android.gms:play-services-appstate:6.5.87'
compile 'com.android.support:appcompat-v7:21.0.3'
}
Edit:
These are the last lines I get after executing command gradlew compileDebug --debug
19:41:12.705 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':app:preDexDebug'.
19:41:12.709 [INFO] [org.gradle.api.internal.changedetection.changes.RebuildIncrementalTaskInputs] All input files are considered out-of-date for incremental task ':app:preDexDebug'.
19:41:12.727 [INFO] [org.gradle.api.Project] deleteDir([project path]\app\build\intermediates\pre-dexed\debug) returned: true
19:41:12.883 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-f48e1e2d7fed6fd712d566edcfe5446521dd959c.jar [sdk path]\extras\android\m2repository\com\android\support\support-annotations\21.0.3\support-annotations-21.0.3.jar
19:41:12.884 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\classes-920ebcdb8b3cfaba9b90d0f66feb55760d423363.jar [project path]\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-appstate\6.5.87\classes.jar
19:41:12.884 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\classes-86902da0c51206b900608e2edb367d123dbaf04f.jar [project path]\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-plus\6.5.87\classes.jar
19:41:12.884 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\internal_impl-21.0.3-3d47273c8cdf03ba3e7b9c20952c50740d93498c.jar [project path]\app\build\intermediates\exploded-aar\com.android.support\support-v4\21.0.3\libs\internal_impl-21.0.3.jar
19:41:12.885 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\acra-4.5.0-adedb5c8d6e931ec4ff3c31d7e45ba018b21026a.jar [user root]\.gradle\caches\modules-2\files-2.1\ch.acra\acra\4.5.0\44a5eb946e0d83eed4a0128d877ca1fd8168b83a\acra-4.5.0.jar
19:41:12.903 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\classes-048b7b5d8c155de5d2796564db58a43a8b9cc429.jar [project path]\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-games\6.5.87\classes.jar
19:41:12.911 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\classes-73e2551a5d112c60cea4e094fef4cf6fa73f8986.jar [project path]\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\6.5.87\classes.jar
19:41:12.926 [INFO] [org.gradle.api.Project] command: [sdk path]\build-tools\20.0.0\dx.bat --dex --verbose --output [project path]\app\build\intermediates\pre-dexed\debug\classes-dc8324f5ce54136fc613d3f6f22fd716ccf64d9d.jar [project path]\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\classes.jar
Edit2:
Things I've tried:
- Cleaning the project
- Downloading my whole project again from the Git repository removing any additional files in the process
- Invalidating Android Studio caches
- Excluding play-services-base from two of the gms packages, because apparently it comes bundled
Edit3:
Now it gets stuck to mergeDebugResources with a pretty similar info dump.
Edit4:
Building works on my Linux machine with the exactly same source files and exactly same settings.