生成签名 APK:构建 APK 时出错条目“META-INF/MANIFEST.MF”名称不同78 对 20

如何解决生成签名 APK:构建 APK 时出错条目“META-INF/MANIFEST.MF”名称不同78 对 20

我有两种构建类型

buildTypes {
        release {
            proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
            signingConfig signingConfigs.release
            resValue "string","version_mode",""
        }
        debug { 
            signingConfig signingConfigs.debug
            resValue "string","UAT"
        }
    }

当我生成已签名的 APK 以供发布时,它的工作正常,但是

当我尝试为调试构建类型生成签名的 APK 时,出现以下错误

条目“meta-inf/MANIFEST.MF”名称不同(78 对 20)

我的 build.gradle(项目级别)文件

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.2'
        classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc2'
        classpath 'com.google.gms:google-services:4.3.5' // google-services plugin
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1'
        
    }
}

allprojects {
    repositories {
        google()
        maven { url "https://maven.google.com" }
        jcenter()
        maven { url "http://dl.bintray.com/pt-midtrans/maven" }
        maven { url "https://jitpack.io" }
    }
}

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

我的 build.gradle(应用级)文件

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
android {
    aaptOptions {
        cruncherEnabled = false
    }

    signingConfigs {
        debug {
            storeFile file("libs/*********.jks")
            storePassword '*********'
            keyPassword '*********'
            keyAlias '*********'
        }

        release {
            storeFile file("libs/*********.jks")
            storePassword '*********'
            keyPassword '*********'
            keyAlias '*********'
        }
    }

    compileSdkVersion 29
    buildToolsversion '29.0.3'

    defaultConfig {
        applicationId "com.*********"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 24
        versionName "2.8.8"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true

    }
    configurations {
        cleanedAnnotations
        compile.exclude group: 'org.jetbrains',module:'annotations'
    }
    buildTypes {
        release {
            proguardFiles getDefaultProguardFile('proguard-android.txt'),""
        }
        debug {
        signingConfig signingConfigs.debug
            resValue "string","UAT"
        }
    }

    flavorDimensions "default"

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}
dependencies {
    implementation filetree(include: ['*.jar'],dir: 'libs')
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',{
        exclude group: 'com.android.support',module: 'support-annotations'
    })
    implementation 'net.gotev:uploadservice:3.5.2'
    implementation 'com.android.support:appcompat-v7:29.0.0'
    implementation 'com.android.support:support-core-utils:29.0.0'
    //networking
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    //design
    implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
    implementation 'cn.fanrunqi:waveprogress:1.0.1'
    implementation 'com.kbeanie:image-chooser-library:1.5.8@aar'
    implementation 'com.github.anastr:speedviewlib:1.1.5'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    //implementation 'com.android.support:support-vector-drawable:29.0.0'
    implementation 'com.android.support:cardview-v7:29.0.0'
    implementation 'com.android.support:percent:29.0.0'
    implementation 'com.android.support:recyclerview-v7:29.0.0'

    implementation 'com.kbeanie:multipicker:1.6@aar'

    //google
    implementation 'com.google.android.gms:play-services-auth:18.1.0'
    implementation 'com.google.android.gms:play-services-plus:17.0.0'
    implementation 'com.google.android.gms:play-services-base:17.5.0'
    implementation 'com.google.android.gms:play-services-location:17.1.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-safetynet:17.0.0'

    //firebase
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.facebook.android:facebook-android-sdk:4.0.0'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
    implementation 'com.android.support:support-v4:29.0.0'
    implementation 'com.google.firebase:firebase-core:18.0.0'
    implementation 'com.google.firebase:firebase-messaging:21.0.0'
    implementation 'com.google.firebase:firebase-auth:20.0.0'
    implementation 'com.google.firebase:firebase-invites:17.0.0'
    implementation 'com.firebase:firebase-jobdispatcher:0.8.5'

    implementation 'org.jetbrains:annotations-java5:15.0'
    
    //utility
    implementation 'com.github.joielechong:countrycodepicker:2.1.5'

    //datetimepicker
    implementation 'com.wdullaer:materialdatetimepicker:3.6.0'
    implementation 'co.lujun:androidtagview:1.1.4'//tag view


    implementation('com.alimuzaffar.lib:pinentryedittext:1.3.10') {
        exclude group: 'com.android.support',module: 'support-v4'
        exclude group: 'com.android.support',module: 'appcompat-v7'
        exclude group: 'com.android.support',module: 'support-v13'
    }

    // (Recommended) Add the Google Analytics dependency.
    implementation 'com.google.firebase:firebase-analytics:18.0.2'
    implementation 'com.google.firebase:firebase-crashlytics:17.4.0'

    implementation 'com.midtrans:corekit:1.24.1-SANDBox'
    implementation 'com.midtrans:uikit:1.24.1-SANDBox'

    implementation 'commons-io:commons-io:2.6'
    
    implementation 'com.jakewharton:butterknife:10.2.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
    
    implementation "androidx.work:work-runtime:2.4.0"

    implementation group: 'net.objecthunter',name: 'exp4j',version: '0.4.4'

    implementation 'me.tankery.lib:circularSeekBar:1.2.0'
    implementation 'com.github.florent37:expansionpanel:1.2.4'

    implementation 'io.reactivex.rxjava3:rxjava:3.0.0'

    implementation 'com.airbnb.android:lottie:3.5.0'
}

repositories {
    google()
    maven { url 'https://dl.bintray.com/sj/maven/' }

    mavenCentral()
    flatDir {
        dirs 'libs'
    }

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

我在 ERROR “duplicate entry: META-INF/MANIFEST.MF” 上尝试了所有给定的解决方案,但没有帮助 我也尝试了 stackoverflow 上给出的各种解决方案,但仍然面临同样的问题

如果您对此有任何解决方案,请帮助我

**注意:- 这不是重复的问题,我对同一问题进行了大量搜索,但没有找到任何解决方案 **

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?