2017-10-30 9 views
1

Androidスタジオ3.0更新後にdexをマージできません。 私もstackoverflowのから非常に多くの古い質問しようとした: -Android Studio 2.3.3以降をアップデートした後dexをマージできません

を、それは私のために動作しません。

FAILURE:例外が発生してビルドに失敗しました。

何が問題になりましたか:タスク ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'の実行に失敗しました。

java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException: DEX

そして、私のアプリのGradleのファイルをマージすることができませんが、以下に与えている: -

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.2' 
    defaultConfig { 
     applicationId "com.example" 
     minSdkVersion 15 
     targetSdkVersion 26 
     versionCode 5 
     versionName "1.4" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 

     multiDexEnabled true 

     manifestPlaceholders = [onesignal_app_id: "One Signal Key", 
           onesignal_google_project_number: "REMOTE"] 
    } 

    lintOptions { 
     checkReleaseBuilds false 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile files('libs/acra-4.5.0.jar') 
    compile files('libs/signpost-commonshttp4-1.2.1.1.jar') 
    compile files('libs/signpost-core-1.2.1.1.jar') 
    compile files('libs/signpost-jetty6-1.2.1.1.jar') 
    compile files('libs/twitter4j-core-2.1.6.jar') 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.android.support:design:26.1.0' 
    compile 'fr.avianey.com.viewpagerindicator:library:[email protected]' 
    compile 'com.intuit.sdp:sdp-android:1.0.4' 
    compile 'com.android.support:cardview-v7:26.1.0' 
    compile 'com.google.android.gms:play-services:11.0.2' 
    compile 'com.android.support:appcompat-v7:26.1.0' 
    compile 'com.android.support:multidex:1.0.0' 
    compile 'com.android.support:customtabs:26.1.0' 
    compile 'com.android.support:palette-v7:26.1.0' 
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+' 
    compile 'com.github.amlcurran.showcaseview:library:5.4.3' 
    compile 'com.google.android.exoplayer:exoplayer:r1.5.7' 
    compile 'com.android.support:support-v4:26.1.0' 
    compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]' 
} 
+0

'com.android.support:multidex:1.0.2' – AbuQauod

+0

あなたの提案の後、私もそれを試みましたが、彼らは私のために働くことはできません。 –

+0

Googleのリポジトリとgradleラッパーのバージョンで変更を行ったことがありますか?また、拡張されたアプリケーションクラスを持っていますか?マルチディックスや関連する変更のためにデフォルトのアプリケーション名前空間が使用されていますか? –

答えて

0

このステートメントを削除: multiDexEnabled true