believe that everyone in the Android development can not avoid to be integrated in the process of the third party after a project, integration, sometimes it will encounter this ash often hate transformClassesWithDexForDebug, detailed Log is as follows: span> p>
Error:Execution failed for task ':APP:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
The main reason for this problem is that the introduction of Libary overlaps with some Libs in existing projects. Please check in detail and make sure that there is only one copy of lib in use, such as v4, v7, utdid.jar, etc.
if you use other android’s official support library see, http://developer.android.com/tools/support-library/features.html
if there is still a problem after the above situation check, you can try to use the following configuration to solve the problem
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
...
//Enabling multidex support.
multiDexEnabled true
}
dependencies {
compile ´com.android.support:multidex:1.0.1´
}
and then in the manifest we introduce this, if there is a custom AppApplication, let your own AppApplication inherit this class
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.multidex.myapplication">
<application
...
android:name="android.support.multidex.MultiDexApplication">
...
</application>
</manifest>
may also be a JDK version 1.8 problem, which is not an accident, so suspect that Gradle has compatibility problems with JDK 1.8 and try to reduce the number of JDK dependencies to 1.7
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
can be run or there will be errors after the configuration is completed, so we can also add this sentence in app.bulid and re-run after that. The specific amount or 4g can be seen from the computer configuration modification (2g, 3g, 6g, 8g).
dexOptions {
javaMaxHeapSize "4g"
}
the above is the Error: I met in the Execution failed for task ‘: APP: transformClassesWithDexForDebug’ all solutions, sharing out hope to help everyone.
Read More:
- Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’
- Execution failed for task ‘:app:processDebugManifest’.
- Android appears java.lang.NoClassDefFoundError A solution to the error
- Android Studio error “Manifest merger failed with multiple errors, see logs” solution
- As Error:Failed to find configured root that contains /storage/emulated/0/xxx/xxx/xxx.png
- How to Fix:java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost
- Default interface methods are only supported starting with Android N (–min-api 24): com.XXXX
- Failed to resolve: com.github
- Solution of fileuriexposedexception for Android 7.0 behavior change
- Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:\….\0.jar
- error MSB6006: “mt.exe” exited with code 31 solution
- Android Studio Error: Invoke-customs are only supported starting with Android O (–min-api 26)
- Execution failed for task ‘:app:stripDebugDebugSymbols‘.
- App: Cleartext traffic not permitted
- Installation error: install_ FAILED_ VERSION_ DOWNGRADE
- Android has applied for permission and still prompts open failed: eacces (permission denied)
- Manifest merger failed with multiple errors, see logs
- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in u