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

后端 未结 9 1381
我在风中等你
我在风中等你 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:31

    I added below lines inside <application> tag

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

    below lines inside gradle.properties file

    android.useAndroidX=true android.enableJetifier=true

    Rebuild your project.

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

    you need just add this code in gradle.properties file

    android.useAndroidX=true
    android.enableJetifier=true
    
    0 讨论(0)
  • 2020-12-05 04:32

    It often happened because you used Androidx libraries and support libraries at the same time. Some 3rd-party libraries may contain support libraries and other 3rd-party libraries may contain Androidx libraries, this can also lead this problem. If you have gradle environment in you PC, try "gradlew :app:dependencies" command in the terminal of Android Studio, this command will list all libraries including 3rd-party libraries of your project, and see which library or framework used Androidx libraries and which not. Then try to upgrade old libraries used support libraries, and this problem should disappear.

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