Android Material and appcompat Manifest merger failed in react-native or ExpoKit

前端 未结 13 1338
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 16:07

I updated \'android.support:appcompat-v7\' to 28.0.0.

But it brought an error from the build.

Attribute application@appComponentFactory          


        
13条回答
  •  感动是毒
    2020-12-15 16:40

    If you are not using react-native-device-info, but have the same error, its probably another library in your project.

    Use this to find the library in question:

    cd your-react-native-project/android
    ./gradlew app:dependencies > deps.txt
    

    Then inspect the deps.txt file for keyword "androidx". Then you can quickly find which native module is using it.

    In my case it was react-native-camera, for which solution above was good but not enough so I had to add this to local.properties:

    firebaseVersion=17.6.0
    googlePlayServicesVersion=16.1.0
    googlePlayServicesVisionVersion=16.2.0
    

    EDIT: After these fixes, running ./gradlew app:dependencies > deps.txt and searching for "androidx" returned no results - this is what we are looking for.

    After running clean on the project, build worked.

提交回复
热议问题