亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法合并Dex

無法合并Dex

九州編程 2019-06-06 13:15:37
無法合并Dex我有安卓工作室Beta。我創建了一個新項目,編譯了我的舊模塊,但是當我嘗試啟動應用程序時,它沒有帶著消息啟動:Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.com.android.builder.dexing.DexArchiveMergerException:無法合并dex但我不知道怎么解決這個錯誤。我在谷歌上搜索了幾個小時,但沒有成功。我的項目分級:    // Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {     repositories {         jcenter()         google()     }     dependencies {         classpath 'com.android.tools.build:gradle:3.0.0-beta6'         classpath "io.realm:realm-gradle-plugin:3.7.1"         classpath 'com.google.gms:google-services:3.1.0'         // NOTE: Do not place your application dependencies here; they belong         // in the individual module build.gradle files     }}allprojects {     repositories {         jcenter()         google()     }}task clean(type: Delete) {     delete rootProject.buildDir}我的應用程序Gradle:    apply plugin: 'com.android.application'android {     compileSdkVersion 26     buildToolsVersion "26.0.1"     defaultConfig {         applicationId "parad0x.sk.onlyforyou"         minSdkVersion 21         targetSdkVersion 26         versionCode 1         versionName "1.0"         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"         multiDexEnabled true     }     buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'         }         debug {         }     }     compileOptions {         targetCompatibility 1.7         sourceCompatibility 1.7     }     packagingOptions {         exclude 'META-INF/LICENSE'         exclude 'META-INF/NOTICE'     }     lintOptions {         checkReleaseBuilds false     }當我沒有導入第二個模塊(解析器)時,應用程序沒有在Dex上崩潰,但是當模塊沒有被導入時,應用程序就不能工作了。*D:d
查看完整描述

3 回答

?
DIEA

TA貢獻1820條經驗 獲得超2個贊

當我更新時,我也遇到了同樣的問題。com.google.android.gms:play-services:11.2.2com.google.android.gms:play-services:11.4.0..這為我解決了這個問題:

  1. 打掃,清除
  2. 重建


查看完整回答
反對 回復 2019-06-06
?
慕尼黑8549860

TA貢獻1818條經驗 獲得超11個贊

以上我都試過了,但沒有一種方法對我有幫助,最后,我發現這是我的工作:

APP/build.gradle:

android {
    defaultConfig {
       multiDexEnabled true
    }}


查看完整回答
反對 回復 2019-06-06
  • 3 回答
  • 0 關注
  • 569 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號