Error:Execution failed for task ':app:dexMt_360Debug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
build.gradle in my project:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile project(':J2WBase')
compile 'com.facebook.react:react-native:0.17.1'
}
build.gradle in the third party framework:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.jakewharton:butterknife:6.1.0'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'commons-lang:commons-lang:2.6'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.greenrobot:eventbus:2.4.0'
}
I have tried to delete the build folder, re build project
Upgrade buildtools to the latest version
I think it might be a jar package duplicate reference problem, but I can't find a place to repeat, and what should I do next, since quoting'com.facebook.react:react-native:0.17.1 compile.
Related
I am trying to incorporate Facebook SDK , but Android Studio is giving me errors at compile time.
Here is my 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.8.0_51\bin\java.exe'' finished with non-zero exit value 2
Gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/gcm.jar')
compile files('libs/httpmime-4.1.1.jar')
compile files('libs/junit-4.10.jar')
compile files('libs/ksoap2-android-assembly-2.4-jar-with-dependencies.jar')
compile files('libs/signpost-commonshttp4-1.2.1.1.jar')
compile files('libs/signpost-core-1.2.1.1.jar')
compile files('libs/signpost-jetty6-1.2.1.1.jar')
compile files('libs/twitter4j-core-3.0.5.jar')
compile project(':stripe')
compile project(':FacebookSDK')
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.intuit.sdp:sdp-android:1.0.3'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.specyci:residemenu:1.6+'
compile 'com.android.support:multidex:1.0.0'
}
But this doesn't work, and honestly isn't a good solution. When I remove facebook sdk, my app compiles no problem, but with it nothing works. What am I missing here?
You are over 64K methods in your build because of using so many libraries, enable multiDex, clear unused libraries, remove unused methods with ProGuard or whatever you want, but you have reached the method count limit for a single APK.
I'm using Android Studio for the first time and I got the following error
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2
build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':tag-cloud')
compile('com.twitter.sdk.android:twitter:1.8.0#aar') {
transitive = true;
}
compile files('libs/bolts-android-1.2.1.jar')
compile files('libs/aws-android-sdk-s3-2.2.6.jar')
compile files('libs/aws-android-sdk-core-2.2.6.jar')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.koushikdutta.ion:ion:2.1.6'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:design:23.0.1'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'de.greenrobot:eventbus:2.4.0'
compile files('libs/FlurryAnalytics-6.2.0.jar')
compile 'me.leolin:ShortcutBadger:1.1.3#aar'
}
Do you have any idea what the problem could be and how can it be solved? A good explanation for the problem would be useful too as I am new to Android Studio. Thanks in advance :)
This options may solve the issue
Clean The Project
Remove all unused dependencies in build.gradle
If not solved then Declare this in gradle config.
defaultConfig {
multiDexEnabled true
}
I am using AWS sdk for java for storing the app data in dynamodb and AWS sdk for android for using amazon services. But whenever I try to run the app it shows this error.
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: com/amazonaws/services/cognitosync/AmazonCognitoSync.class
build.gradle
dependencies {
compile 'com.github.PhilJay:MPAndroidChart:v2.0.9'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.github.AndroidDeveloperLB:MaterialPreferenceLibrary:5'
compile 'com.android.support:design:23.1.0'
compile files('libs/achartengine-1.1.0.jar')
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.sothree.slidinguppanel:library:3.2.0'
compile 'com.appyvet:materialrangebar:1.3'
compile 'com.github.lzyzsd:circleprogress:1.1.0#aar'
compile 'com.amazonaws:aws-java-sdk:1.10.37'
compile 'com.amazonaws:aws-android-sdk-core:2.2.9'
compile 'com.amazonaws:aws-android-sdk-cognito:2.2.9'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.9'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.9'
I am stuck on it from hours. Please can someone help me with this
Thanks
Error when importing the project via git .I tried importing the project via git and executed the project and it gives me this error:
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
main:
compile 'com.android.support:design:22.2.1'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.ocpsoft:ocpsoft-pretty-time:1.0.6'
compile project(':facebook2')
compile 'jp.wasabeef:recyclerview-animators:1.2.0#aar'
compile 'jp.wasabeef:picasso-transformations:1.0.5'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.2.3'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okio:okio:1.0.1'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.nineoldandroids:library:2.4.0'
horizontal:
dependencies {
compile 'com.android.support:support-v4:18.+'
}
facebook:
dependencies {
compile 'com.android.support:support-v4:[21,22)'
compile 'com.parse.bolts:bolts-android:1.2.0'
}
You see where you have:
compile 'com.google.android.gms:play-services:7.5.0'
You are actually compiling all of Google's play services and that will often result in a mulidex error, meaning you have a whole lot of modules and code. It is best to only compile the API you need, for instance, if you want to use play service's location API just compile it this way:
compile 'com.google.android.gms:play-services-location:7.5.0'
I'm trying to add the new Support Design library to my project:
compile 'com.android.support:design:22.2.0'
But as soon as I try to compile, I get the following 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.8.0_40\bin\java.exe'' finished with non-zero exit value 3
I've already reached the 65k method limit a few libraries back, so I already added MultiDex support and solver that problem a while ago.
Here are all my dependencies, if it helps:
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
compile('com.crashlytics.sdk.android:crashlytics:2.2.2#aar') {
transitive = true;
}
compile 'com.helpshift:android-aar:3.8.0'
compile 'com.google.maps.android:android-maps-utils:0.3+'
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.kierans:ViewPagerIndicator:138e5f5bd9'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.balysv:material-ripple:1.0.2'
compile 'it.neokree:MaterialNavigationDrawer:1.3.3'
compile 'pl.charmas.android:android-reactive-location:0.6#aar'
compile 'io.reactivex:rxjava:1.0.10'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
I know there are a lot of them, but I need them all.
You should consider changing your compile 'com.google.android.gms:play-services:7.5.0' dependency, and grab only a portion of the Play Services.
You can see the guide for it at https://developers.google.com/android/guides/setup#split , that will most likely solve your 65k issue as well.