I am getting the following error when I try to execute my app.
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: com/google/android/gms/dynamic/LifecycleDelegate.class
I believe that this error has something to do with my gradle file which is as follows
enandroid {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.nirmal.sportsparse"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}
dependencies {
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.android.support:multidex:1.0.0'
}
dependencies {
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
}
I get the above mentioned error if I include multidex support
If I disable it 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_60\bin\java.exe'' finished with non-zero exit value 2
What is the reason for this and how can I resolve this???
Related
Can anyone please tell me how do i fix this error:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.example.abhishek.detector"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
}
Error:
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\hp-pc\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1
Install the latest version of the build tools. Adjust your build.gradle to use
`buildToolsVersion "23.0.2"`
or check and remove duplicate dependencies from list.
Enjoy :)
Change the sdk version from the values/string.xml
Here is mybuild.gradle file here I added jexcel.jar for my project after that is shows error
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.web03.bulkmessenger"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:multidex:1.0.0'
compile 'net.sourceforge.jexcelapi:jxl:2.6.3'
}
my error list is given below
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: jxl/biff/AutoFilter.class
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
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.sharu.places"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
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.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-nearby:8.4.0'
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
compile 'com.android.support:multidex:1.0.1'
}
Please help me with this problem.Thanks in advance.
This happens quite frequently.
Just "Clean the project" -> "Rebuild the project", and you will be good to go.
I've created a project that connected to the web server parse.com
Now I encounter an error that I can not fix it
****build.gradle(Module:app)****
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/AnimRes.class
Here is the code:
enterapply plugin: 'com.android.application'
android
{
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig
{
applicationId "app.chat.chattapp"
multiDexEnabled true
minSdkVersion 6
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.parse:parse-android:1.9.3'
// compile 'com.android.support:appcompat-v7:22.2.1'
// compile 'com.squareup.picasso:picasso:2.5.2'
// compile 'com.parse.bolts:bolts-android:1.+'
// compile 'com.parse:parse-android:1.+'
}
The code is
Error:Execution failed for task
':app:transformClassesWithJarMergingForDebug'.
com.android.build.transform.api.TransformException:
java.util.zip.ZipException: duplicate entry:
android/support/annotation/AnimRes.class
Problem is here , Duplicate Entry . Same Library calling 2 times.
That's why have problem .
Don't
compile 'com.parse:parse-android:1.+'
compile 'com.parse:parse-android:1.9.3'
Do
compile 'com.parse:parse-android:1.9.3'
Suggestions
Do add this
compile 'com.android.support:multidex:1.0.0'
Finally
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.9.3'
compile 'com.android.support:multidex:1.0.0'
}
Then Clean-Rebuild-Restart-Sync
I am making an Andoird app in which I have used many dependencies and I need all the dependencies.but an error has encountered stating that rippleColor has already been defined.
I have searched on the internet all I have found is that my dependencies have same name in values.xml.
Error1:-
Attribute "rippleColor" has already been defined
Error2:-
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\RANJEET JAIN\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
My gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "ranjeet.example.com.finance"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.github.navasmdc:MaterialDesign:1.5#aar'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.parse:parse-android:1.10.2'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
}