Android程序类型已存在:BufferOverflowException

时间:2018-11-14 09:59:17

标签: android android-studio

我在Android Studio 3.2.1上开发了一个Android应用程序,并且导入了aar模块来读取阿联酋身份证卡,我可以在设备上运行该应用程序而没有任何问题。

我尝试为我的应用程序生成一个APK(调试/签名)文件,但出现此错误:

Program type already present: com.acs.smartcard.BufferOverflowException

其中com.acs.smartcard是模块程序包名称。

我的应用程序build.gradle文件:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }

}


android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "biz.wasel.driver"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 3
        versionName "1.0.4"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dataBinding {
        enabled = true
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:support-annotations:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test:rules:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'

    implementation 'android.arch.lifecycle:extensions:1.1.1'

    implementation 'com.android.volley:volley:1.1.0'

    implementation 'com.google.code.gson:gson:2.8.4'

    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'

    implementation 'com.android.support:design:28.0.0'

    implementation 'com.google.firebase:firebase-messaging:17.0.0'

    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

    implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'

    implementation 'me.philio:pinentryview:1.0.6'
    implementation 'com.poovam:pin-edittext-field:1.0.3'

    implementation 'com.android.support:support-compat:28.0.0'
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'

    implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'

    implementation 'de.hdodenhof:circleimageview:2.2.0'

    implementation 'com.ramotion.cardslider:card-slider:0.2.0'

    implementation 'com.android.support:preference-v7:28.0.0'

    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'

    implementation 'com.yarolegovich:discrete-scrollview:1.4.7'

    implementation 'net.gotev:uploadservice:3.4.2'

    implementation 'com.github.esafirm.android-image-picker:imagepicker:1.13.1'

    implementation 'android.arch.paging:runtime:1.0.0'

    implementation 'com.github.ome450901:SimpleRatingBar:1.4.2'
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
        transitive = true;
    }

    implementation 'id.zelory:compressor:2.1.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.github.gmazzo:nestedscroll-maps:0.4'
    implementation 'com.hanks.animatecheckbox:library:0.1'
    implementation 'com.sothree.slidinguppanel:library:3.4.0'
    implementation 'com.hbb20:ccp:2.1.2'
    implementation 'com.github.Binary-Finery:Bungee:master-SNAPSHOT'
    implementation 'com.github.gcacace:signature-pad:1.2.1'
    implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'

    implementation project(':acs-plugin-release')
    implementation project(':EIDAToolkit')
}
apply plugin: 'com.google.gms.google-services'

我的项目级别build.gradle是

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven { url 'http://maven.microblink.com' }


    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

注意: 当我发表评论

implementation project(':acs-plugin-release')

form app build.gradle我可以毫无问题地生成APK,但是我需要此模块来完成应用程序。 我尝试了herehere的许多解决方案,但是它们没有用!

有帮助吗?!

谢谢

0 个答案:

没有答案