程序类型已经存在:org.apache.commons.codec.CharEncoding

时间:2019-02-07 13:08:12

标签: android android-studio multidex android-multidex

这是build.gradle

 apply plugin: 'com.android.application'

   android {
   compileSdkVersion 27
    defaultConfig {
    applicationId "com.mymoonah.karameesh"
    minSdkVersion 17
    targetSdkVersion 27
    versionCode 4
    versionName "1.0.2"
    buildConfigField 'String', 'APP_ID', '"6"'
    multiDexEnabled true
   }
  signingConfigs {
    config {
        keyAlias 'Mymoonah'
        keyPassword 'Mymoonah911'
        storePassword 'Mymoonah911'
        storeFile 
  file('/Users/ramzishadid/Desktop/work/mymoonah/MymoonahKeyStore')
    }
 }

  buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
 'proguard-rules.pro'
        signingConfig signingConfigs.config
        debuggable false
        multiDexKeepFile file('multidex-config.txt')
    }
   }
    packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml'
}
   dexOptions {
    javaMaxHeapSize "6g"
    preDexLibraries = true
}
  lintOptions {
    checkReleaseBuilds false
    abortOnError false
 }
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.android.gms:play-services- 
analytics:11.8.0'
implementation 'com.google.guava:guava:24.1-android'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation ('com.coinbase.android:coinbase-android-sdk:1.0.1'){
    exclude group: 'org.apache.httpcomponents', module:'httpclient'
}

implementation project(':jNCryptor')
implementation project(':cordova')
api project(':listable')

 }
  apply plugin: 'com.google.gms.google-services'

这是我遇到的更多错误

  1.   

    由于:java.lang.RuntimeException:       com.android.builder.dexing.DexArchiveMergerException:合并dex存档时出错

  2.   

    原因:com.android.builder.dexing.DexArchiveMergerException:       合并dex存档时出错

  3.   

    原因:com.android.tools.r8.CompilationFailedException:       编译无法完成

  4.   

    原因:com.android.tools.r8.utils.AbortException:错误:程序类型已存在:org.apache.commons.codec.CharEncoding

有什么想法吗?

0 个答案:

没有答案