Please help to fix the compilation error.

When compiling an application, different errors occur on different devices.

On the emulator 4.1.1 version of the android and the real device 4.0.4 this error takes off:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/util/ThreadUtil$BackgroundCallback.class 

On the emulator Android 5.1.1 crash with this code:

 08-30 16:37:50.845 2095-2162/helmus.finalversion A/libc: Fatal signal 4 (SIGILL), code 2, fault addr 0xf71d25ce in tid 2162 (AsyncTask #1) 08-30 16:37:50.854 2095-2166/helmus.finalversion A/libc: Fatal signal 4 (SIGILL), code 2, fault addr 0xf71d25ce in tid 2166 (AsyncTask #2) 

At the same time on real devices above the fifth version, everything works fine.

The error appeared after adding ads from Appodeal. Most likely I am somewhere nakosyachil. Below I attach the build.gradle (app) and Android Manifests

build.gradle:

  apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "helmus.finalversion" minSdkVersion 10 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:multidex:1.0.1' compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' compile project(':unity-ads-1.5.8') compile project(':cheetah-mobile-3.4.7') compile 'com.google.android.gms:play-services:9.4.0' compile 'com.google.android.gms:play-services-ads:9.4.0' compile 'com.google.android.gms:play-services-location:9.4.0' } 

In the manifest of 165 lines, that 's why here is a link to the xml document on google disk.

Thank you in advance)

    1 answer 1

    It was decided to remove the unity-ads-1.4.7.jar and android-support-v4-23.1.1.jar . Perhaps the studio will still swear on the library android-support-v7 . It will help the same removal. The conflict arises because the application uses multidex , which in turn uses these same libraries android-support-v4 and android-support-v7