Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase 反应本机任务:应用程序:checkDebugDuplicateClasses失败修复依赖项解析错误_Firebase_React Native_React Native Android - Fatal编程技术网

Firebase 反应本机任务:应用程序:checkDebugDuplicateClasses失败修复依赖项解析错误

Firebase 反应本机任务:应用程序:checkDebugDuplicateClasses失败修复依赖项解析错误,firebase,react-native,react-native-android,Firebase,React Native,React Native Android,ı如何解决这个问题?我试过了。/gradlew clean and react native运行android,但仍然出错 /格雷德尔先生 app/build.gradle android { lintOptions { checkReleaseBuilds false } compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatib

ı如何解决这个问题?我试过了。/gradlew clean and react native运行android,但仍然出错

/格雷德尔先生 app/build.gradle

android {

    lintOptions { 

    checkReleaseBuilds false

}
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.seeandsign.papilon"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 6
        versionName "2.1.1"
        missingDimensionStrategy 'react-native-camera', 'mlkit'
        multiDexEnabled true     
    }
    
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
                storeFile file(MYAPP_UPLOAD_STORE_FILE)
                storePassword MYAPP_UPLOAD_STORE_PASSWORD
                keyAlias MYAPP_UPLOAD_KEY_ALIAS
                keyPassword MYAPP_UPLOAD_KEY_PASSWORD
            }
        }
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://facebook.github.io/react-native/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }

    packagingOptions {
        pickFirst "lib/armeabi-v7a/libc++_shared.so"
        pickFirst "lib/arm64-v8a/libc++_shared.so"
        pickFirst "lib/x86/libc++_shared.so"
        pickFirst "lib/x86_64/libc++_shared.so"
    }

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    implementation 'com.google.firebase:firebase-analytics:17.6.0'
    implementation 'com.android.support:multidex:1.0.3'

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
      exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'
##错误

出了什么问题:

Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
 (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzkh found in modules play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzki found in modules play-services- (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzv found in modules play-services-vision-20.0.0-runtime.jar (com.google.android.gms:play-services-vision:20.0.0) and play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzw found in modules play-services-vision-20.0.0-runtime.jar (com.google.android.gms:play-services-vision:20.0.0) and play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
任务的执行失败:应用程序:checkDebugDuplicateClasses。 >工人提出了1个例外情况: (com.google.android.gms:play services vision common:19.1.0)和play-services-vision-face-contour-internal-16.0.0-runtime.jar(com.google.android.gms:play services vision-face-contour-internal:16.0.0) 在模块play-services-vision-common-19.1.0-runtime.jar(com.google.android.gms:play-services-vision-common:19.1.0)和play-services-vision-face-contour-internal-16.0.0-runtime.jar(com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)中找到重复的类com.google.android.vision.vision.zzkh 在play services(com.google.android.gms.internal.vision.zzki)模块(com.google.android.gms:play services vision common:19.1.0)和play-services-vision-face-contour-internal-16.0.0-runtime.jar(com.google.android.gms:play services vision face contour internal:16.0.0)模块中找到重复的类 在模块play-services-vision-20.0.0-runtime.jar(com.google.android.gms:play-services-vision:20.0.0)和play-services-vision-common-19.1.0-runtime.jar(com.google.android.gms:play-services-vision-common:19.1.0)中找到重复的类com.google.android.vision.zzv 在模块play-services-vision-20.0.0-runtime.jar(com.google.android.gms:play-services-vision:20.0.0)和play-services-vision-common-19.1.0-runtime.jar(com.google.android.gms:play-services-vision-common:19.1.0)中找到重复的类com.google.android.vision.zzw 请参阅文档以了解如何使用。
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
 (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzkh found in modules play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzki found in modules play-services- (com.google.android.gms:play-services-vision-common:19.1.0) and play-services-vision-face-contour-internal-16.0.0-runtime.jar (com.google.android.gms:play-services-vision-face-contour-internal:16.0.0)
  Duplicate class com.google.android.gms.internal.vision.zzv found in modules play-services-vision-20.0.0-runtime.jar (com.google.android.gms:play-services-vision:20.0.0) and play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzw found in modules play-services-vision-20.0.0-runtime.jar (com.google.android.gms:play-services-vision:20.0.0) and play-services-vision-common-19.1.0-runtime.jar (com.google.android.gms:play-services-vision-common:19.1.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.