我还有下一年级

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.material:material:1.0.0-rc01'
}

但当我想要构建应用程序时,我得到下一个日志:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0-alpha3] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

好!去显化并去做:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="ru.chopcode.myapplication">

    <application
        tools:replace="android:appComponentFactory"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
    </application>

</manifest>

然后我在我的Logcat中得到这个错误:

Manifest merger failed with multiple errors, see logs that I have Linked with it

当前回答

我也面临着同样的问题, 对于你的android工作室,你只需要更改android Gradle插件3.3.2版本 Gradle版本为5.1.1

其他回答

为了解决这个问题,我建议显式地定义ext变量的版本 在android/build。Gradle你的根项目

ext {
    googlePlayServicesVersion = "16.1.0" // default: "+"
    firebaseVersion = "15.0.2" // default: "+"

    // Other settings
    compileSdkVersion = <Your compile SDK version> // default: 23
    buildToolsVersion = "<Your build tools version>" // default: "23.0.1"
    targetSdkVersion = <Your target SDK version> // default: 23
    supportLibVersion = "<Your support lib version>" // default: 23.1.1
}

参考 https://github.com/zo0r/react-native-push-notification/issues/1109#issuecomment-506414941

改变你的构建。Gradle依赖到

 implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'

or

 implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

这完全取决于库版本的兼容性

我在这只奇怪的虫子面前呆了两个小时。 我通过执行以下步骤解决了这个错误

挂起你的构建。Gradle依赖到

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

to

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

除非你不想使用androidx

所以在我的情况下,我正在使用一个使用androidx的库,但我不使用androidx,所以当我降级该库版本的问题得到了解决。

就我而言:

implementation 'com.github.turing-tech:MaterialScrollBar:13.+'

上述图书馆构成了问题13。+将自动获得一个使用androidx的新版本的库。所以我把库版本降级为:

implementation 'com.github.turing-tech:MaterialScrollBar:13.2.5'

问题解决了。

去Refactor(图片) 单击“迁移到AndroidX”。它的工作 这是工作。