繁体   English   中英

清单合并在本机反应中失败

[英]Manifest merger failed in react native

在运行 react-native run-android 时,我遇到了异常。 我已经尝试了一些我在谷歌上发现的改变,但没有奏效。 下面是我的例外和 gradle 文件。 谷歌方面有任何更新吗? 我怎样才能解决这个问题? 我从昨天开始就面临这个问题。

清单合并失败:属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91

构建 .gradle,..\\app

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

dependencies {
    implementation project(':react-native-webview')
    implementation project(':react-native-i18n')
    implementation project(':react-native-device-info')
    implementation project(':@react-native-community_netinfo')
    implementation project(':@react-native-community_async-storage')
    implementation project(':react-native-camera')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-gesture-handler')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  }

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 27
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}


task wrapper(type: Wrapper) {
    gradleVersion = '4.7'
    distributionUrl = distributionUrl.replace("bin", "all")

请建议..谢谢

我解决了这个使用

npm uninstall react-native-device-info

进而

npm install --save react-native-device-info

最新版本应该是 2.1.2

如果您不使用 react-native-device-info

那么值得一看: React-native manifest merge failed

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM