After the project goes online, how to reduce customers’ doubts about the delivery?Here is the secret script of three moves>>>
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/DEPENDENCIES
File1: /home/dubox/dev/android/caiPiao/app/libs/httpcore-4.4.4.jar
File2: /home/dubox/dev/android/caiPiao/app/libs/httpclient-4.5.2.jar
Find the build.gradle file in the app directory and add the following information to the last side of the Android tag:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
Similar Posts:
- Compilation failure cannot find the class file for org.apache.http.annotation.notthreadsafe
- Android Studio compilation: Program type already present: XXX solution
- Could not find com.android.tools.build:gradle:3.3.0.
- [Solved] Android Studio Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
- [Solved] Could not find method google() for arguments [] on repository container,rn react-native-camera …
- [Solved] Android Studio Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
- [Solved] Android Warning: Gradle DSL method not found: ‘android()’
- Eact Native Generate APP: You have not accepted the license agreements of the following SDK components:
- Error:(1, 0) Plugin with id ‘android’ not found.
- Plugin is too old, please update to a more recent