Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Carla Brooks
803 PointsGradle error
Hi there guys!! I have a little but very important question, I´m trying to update this ompile 'com.android.support:design:23.0.1 to the newer version ompile 'com.android.support:design:23.1.0'... when I sync its all right but when I try to run the app there´s always this error :
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2
Heres the complete code of the gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.andrey.login"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
debug{
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:design:23.1.0'
compile files('libs/commons-io-2.4.jar')
compile files('libs/Parse-1.9.1.jar')
compile files('libs/ParseCrashReporting-1.9.1.jar')
compile files('libs/ParseFacebookUtilsV4-1.9.1.jar')
}
orbyt
10,358 PointsThat isnt the full error. If you scroll up, it should show you the exception. Post that.
Carla Brooks
803 PointsThe whole error is :
:app:dexDebug
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
UNEXPECTED TOP-LEVEL EXCEPTION:
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.Main.main(Main.java:106)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
:app:compileDebugSources UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.dexer.Main.run(Main.java:277)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:prepareDebugDependencies
:app:prepareComGoogleAndroidGmsPlayServicesWearable810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices810Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42310Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72310Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2310Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72310Library UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkDebugManifest
:app:preDebugBuild UP-TO-DATE
:app:preBuild UP-TO-DATE
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Carla Brooks
803 PointsCarla Brooks
803 PointsI have used multidex and nothing I previously intalled the java 8 jkd and now I have tried to run it in the java 7 jdk but still got the same error... please help me!! :(