android - error when use google-directioner lib - android

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 2`
i got error when use this lib
compile 'com.github.jd-alexander:library:1.1.0'
what does that mean?

Related

"C:\dev\sdk\android-sdk-essential\build-tools\24.0.1\aapt.exe" finished with non-zero exit value 1

How can I solve this error:
> Error:Execution failed for task ':app:processDebugResources'. >
> com.android.ide.common.process.ProcessException:
> org.gradle.process.internal.ExecException: Process 'command
> 'C:\dev\sdk\android-sdk-essential\build-tools\24.0.1\aapt.exe''
> finished with non-zero exit value 1
Try to do build apk first then afterwards it will work properly.
It solved!
I found a hint in this link. so I commented useless repositories such as:
// compile 'com.google.android.gms:play-services-ads:11.0.4'
// compile 'com.google.android.gms:play-services-auth:11.0.4'
// compile 'com.google.android.gms:play-services-gcm:11.0.4'

Error: Execution failed for task app:transformClassesWithDexForDebug

I am getting this error when I'm going to build apk.
Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_91\bin\java.exe'' finished with non-zero exit value 3
Here's the screenshot of the error
My problem is solved by using multidex. By adding multiDexEnabled true in defaultConfig and compile 'com.android.support:multidex:1.0.0'
in dependencies in build gradle in app and adding android:name="android.support.multidex.MultiDexApplication" in manifest. Check out screen shots 2:
1:

How to remove Error:Execution failed for task ':app:transformClassesWithDexForDebug' of android

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_92\bin\java.exe'' finished with non-zero exit value 2
If your using Android Studio 2.1.2 and buildtoolVersion as 24.0.0. Downgrade it to 23.0.X.

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebugAndroidTest'

When I run InstrumentationTest,It's build failed.The error message:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebugAndroidTest'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/test/InstrumentationRegistry.class
Somebody tell me why?thank you for you notice
It's just miss words in build.gradle :
packagingOptions {
exclude 'LICENSE.txt'
}
But when I add those words,build failed too,and report other error message :
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/test/BuildConfig;
Error:Execution failed for task ':app:transformClassesWithDexForDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: 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

android: Error:Execution failed for task ':app:dexDebug'.Process finished with non-zero exit value 2

when I compile mapbox my project will have a error.
compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:0.7.4#aar'){
transitive=true
}
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
I tried to use multiDexEnabled true, but it doesn't work.
And I tried to find the same .jar files, I think it is 'com.android.support:support-v4:22.2.0',I delete it and no work.
I don't know how to solve it, please help.

Categories

Resources