Android X: tools:replace specified at line: for attribute, but no new value specified

后端 未结 9 1380
我在风中等你
我在风中等你 2020-12-05 03:34

I have tried many solutions on this website but still, the problem is not solved. The issue is due to Android X library. When I added Android X, this issue was resolved but

相关标签:
9条回答
  • 2020-12-05 04:11

    I think you are migrating to AndroidX libs.

    Add below lines to gradle.properties file

    android.useAndroidX=true
    android.enableJetifier=true
    

    Remove tools:replace="android:appComponentFactory" from manifest.

    Replace android.support.v7.app.AppCompatActivity to androidx.appcompat.app.AppCompatActivity

    Migrating to AndroidX

    0 讨论(0)
  • 2020-12-05 04:13

    migrate to android x

    add below lines inside tag

        tools:replace="android:appComponentFactory"
        android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
    

    then also add below lines inside gradle.properties file

      android.useAndroidX=true
      android.enableJetifier=true
    

    Rebuild your project.

    0 讨论(0)
  • 2020-12-05 04:26

    I got same error in my project, I have resolved it You can try it

    Android Studio > Refactor > Migrate to AndroidX

    0 讨论(0)
  • 2020-12-05 04:27

    You can try adding:

    android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
    

    To the tag <application > in your manifest.

    0 讨论(0)
  • 2020-12-05 04:28

    In my case, i was facing problem because of the firebase version i was using. Downgrading the firebase version helped me.

    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' implementation 'com.google.firebase:firebase-core:16.0.6'

    0 讨论(0)
  • 2020-12-05 04:29

    In my case, I had updated Firebase and play services dependency, result in this issue.

    Reverted back the dependency updates and the error vanished

    Seems that the latest Firebase and Play Service dependencies are compatible with androidx.

    0 讨论(0)
提交回复
热议问题