2

После подключения Multidex, выскакивает тост при запуске приложения на большинство библиотек, которые в виде jarников находятся в папке libs и нужны для Apodeal (такие как Facebook,Applovin,Yandex и т.д).

Integration Error: <Имя библиотеки> classes are already loaded from jar files, remove unnecessary dex files

Сообщение выходит при инциализации Appodeal в Активити:

Appodeal.initialize(this, APPODEAL_API_KEY, Appodeal.INTERSTITIAL | Appodeal.BANNER | Appodeal.NATIVE | Appodeal.MREC);

Причем никаких ошибок при сборке и в логах я не обнаружил.

build.gradle

/.../
repositories {
    maven {
        url "http://dl.bintray.com/dasar/maven"
    }
    flatDir {
        dirs 'libs'
    }
}

android {
    compileSdkVersion 25
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "com.dezmontx"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 17
        versionName "1.1.5"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
        buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }
    debug {
        signingConfig signingConfigs.debug
    }
}
    dexOptions { preDexLibraries = false }

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleDependency
    compile 'com.android.support:appcompat-v7:23.2.1'
    //noinspection GradleDependency
    compile 'com.android.support:recyclerview-v7:23.2.1'
    //noinspection GradleDependency
    compile 'com.android.support:design:23.2.1'
    compile 'com.github.greenfrvr:hashtag-view:1.2.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    annotationProcessor 'com.jakewharton:butterknife:7.0.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'xyz.danoz:recyclerviewfastscroller:0.1.3'
    compile 'net.danlew:android.joda:2.9.3'
    compile('com.github.afollestad.material-dialogs:core:0.8.5.7@aar') {
        transitive = true
    }
    compile('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
        transitive = true
    }
    compile 'com.google.android.gms:play-services-analytics:10.2.1'
    compile 'me.relex:circleindicator:1.2.2@aar'
    compile 'com.thebluealliance:spectrum:0.7.1'
    compile 'uz.shift:colorpicker:0.5@aar'
    compile 'com.squareup.picasso:picasso:2.5.2' //for Inmobi
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services-ads:10.2.1'
    compile 'com.google.android.gms:play-services-location:10.2.1'
    compile 'com.google.android.exoplayer:exoplayer-core:2.7.0'
    compile name: 'adcolony-sdk-3.2.1', ext: 'aar'
    compile name: 'mmedia-6.4.0', ext: 'aar'
    compile name: 'mobvista_alphab', ext: 'aar'
    compile name: 'mobvista_appwall', ext: 'aar'
    compile name: 'mobvista_appwallext', ext: 'aar'
    compile name: 'mobvista_common', ext: 'aar'
    compile name: 'mobvista_interstitial', ext: 'aar'
    compile name: 'mobvista_mvdownloads', ext: 'aar'
    compile name: 'mobvista_mvjscommon', ext: 'aar'
    compile name: 'mobvista_mvnative', ext: 'aar'
    compile name: 'mobvista_nativeex', ext: 'aar'
    compile name: 'mobvista_offerwall', ext: 'aar'
    compile name: 'mobvista_playercommon', ext: 'aar'
    compile name: 'mobvista_reward', ext: 'aar'
    compile name: 'mobvista_videocommon', ext: 'aar'
    compile name: 'mobvista_videofeeds', ext: 'aar'
}
apply plugin: 'com.google.gms.google-services'

1 ответ 1

1

Оказалось, что лишние dex файлы,которые нужно удалить, содержатся в jar файле appodeal в папке assets/dex

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.