gpt4 book ai didi

android - 签名 APK 构建失败重新 :play-services-ads-identifier. 属性冲突

转载 作者:行者123 更新时间:2023-12-03 02:46:19 25 4
gpt4 key购买 nike

我仅在签名 APK 构建期间遇到构建错误。以前签名的 APK 构建工作没有问题。自上次签署 APK Build 以来唯一的变化是我已更新到新的 Android Studio 3.6 -Build #AI-192.7142.36.36.6200805。

构建输出是:
FAILURE:构建失败并出现异常。

  • 什么地方出了错:
    任务 ':app:packageDebug' 执行失败。

    A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Entry name 'play-services-ads-identifier.properties' collided


  • build.gradle(:app)
    apply plugin: 'com.android.application'
    apply plugin: 'com.google.gms.google-services'

    android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
    applicationId "com.clearnetsolutions.qrverify"
    minSdkVersion 16
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
    }
    }

    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.zxing:core:3.3.2'
    implementation 'com.google.android.gms:play-services-vision:19.0.0'
    implementation 'com.google.firebase:firebase-firestore:21.4.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.android.material:material:1.1.0'


    }

    build.gradle(项目)
    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
    repositories {
    google()
    jcenter()

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

    allprojects {
    repositories {
    google()
    jcenter()

    }
    }

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

    如果我构建一个未签名的 APK:
    > Task :app:preBuild UP-TO-DATE
    > Task :app:preDebugBuild UP-TO-DATE
    > Task :app:compileDebugAidl NO-SOURCE
    > Task :app:generateDebugBuildConfig UP-TO-DATE
    > Task :app:compileDebugRenderscript NO-SOURCE
    > Task :app:javaPreCompileDebug UP-TO-DATE
    > Task :app:mainApkListPersistenceDebug UP-TO-DATE
    > Task :app:generateDebugResValues UP-TO-DATE
    > Task :app:generateDebugResources UP-TO-DATE
    > Task :app:processDebugGoogleServices UP-TO-DATE
    > Task :app:mergeDebugResources UP-TO-DATE
    > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
    > Task :app:extractDeepLinksDebug UP-TO-DATE
    > Task :app:processDebugManifest UP-TO-DATE
    > Task :app:processDebugResources UP-TO-DATE
    > Task :app:compileDebugJavaWithJavac UP-TO-DATE
    > Task :app:compileDebugSources UP-TO-DATE
    > Task :app:mergeDebugShaders UP-TO-DATE
    > Task :app:compileDebugShaders UP-TO-DATE
    > Task :app:generateDebugAssets UP-TO-DATE
    > Task :app:mergeDebugAssets UP-TO-DATE
    > Task :app:processDebugJavaRes NO-SOURCE
    > Task :app:mergeDebugJavaResource UP-TO-DATE
    > Task :app:dexBuilderDebug UP-TO-DATE
    > Task :app:checkDebugDuplicateClasses UP-TO-DATE
    > Task :app:multiDexListDebug UP-TO-DATE
    > Task :app:mergeDexDebug UP-TO-DATE
    > Task :app:mergeDebugJniLibFolders UP-TO-DATE
    > Task :app:mergeDebugNativeLibs UP-TO-DATE
    > Task :app:stripDebugDebugSymbols UP-TO-DATE
    > Task :app:validateSigningDebug UP-TO-DATE
    > Task :app:packageDebug
    > Task :app:assembleDebug

    BUILD SUCCESSFUL in 1s
    24 actionable tasks: 1 executed, 23 up-to-date

    如果我构建一个签名的 APK:
    > Task :app:preBuild UP-TO-DATE
    > Task :app:preDebugBuild UP-TO-DATE
    > Task :app:compileDebugAidl NO-SOURCE
    > Task :app:generateDebugBuildConfig UP-TO-DATE
    > Task :app:compileDebugRenderscript NO-SOURCE
    > Task :app:javaPreCompileDebug UP-TO-DATE
    > Task :app:mainApkListPersistenceDebug UP-TO-DATE
    > Task :app:generateDebugResValues UP-TO-DATE
    > Task :app:generateDebugResources UP-TO-DATE
    > Task :app:processDebugGoogleServices UP-TO-DATE
    > Task :app:mergeDebugResources UP-TO-DATE
    > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
    > Task :app:extractDeepLinksDebug UP-TO-DATE
    > Task :app:processDebugManifest UP-TO-DATE
    > Task :app:processDebugResources UP-TO-DATE
    > Task :app:compileDebugJavaWithJavac UP-TO-DATE
    > Task :app:compileDebugSources UP-TO-DATE
    > Task :app:mergeDebugShaders UP-TO-DATE
    > Task :app:compileDebugShaders UP-TO-DATE
    > Task :app:generateDebugAssets UP-TO-DATE
    > Task :app:mergeDebugAssets UP-TO-DATE
    > Task :app:processDebugJavaRes NO-SOURCE
    > Task :app:mergeDebugJavaResource UP-TO-DATE
    > Task :app:checkDebugDuplicateClasses UP-TO-DATE
    > Task :app:dexBuilderDebug UP-TO-DATE
    > Task :app:multiDexListDebug UP-TO-DATE
    > Task :app:mergeDexDebug UP-TO-DATE
    > Task :app:mergeDebugJniLibFolders UP-TO-DATE
    > Task :app:mergeDebugNativeLibs UP-TO-DATE
    > Task :app:stripDebugDebugSymbols UP-TO-DATE
    > Task :app:validateSigningDebug UP-TO-DATE
    > Task :app:packageDebug FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:packageDebug'.
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Entry name 'play-services-ads-identifier.properties' collided

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 982ms
    24 actionable tasks: 1 executed, 23 up-to-date

    我不确定如何更新或解决 :app:packageDebug 问题?和/或识别 play-services-ads-identifier.properties 冲突?

    最佳答案

    我似乎通过删除位于 app/debug 目录中的 apk 和 json 文件解决了这个问题。
    删除后,签名的 APK 构建成功完成。

    关于android - 签名 APK 构建失败重新 :play-services-ads-identifier. 属性冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60402349/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com