Build failed with an exception react native

前端 未结 2 1822
北恋
北恋 2021-01-06 10:44

while running react-native run-android I am getting below exception... It was running fine and I made a git pull and did npm ci and after that, it is coming. Th

相关标签:
2条回答
  • 2021-01-06 11:14

    I solved this

    npm uninstall react-native-device-info
    

    and then

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

    latest version should be 2.1.2

    0 讨论(0)
  • 2021-01-06 11:14

    Add this to your app/build.gradle dependencies:

    configurations.all {
            resolutionStrategy {
                force 'com.google.android.gms:play-services-gcm:16.1.0'
                force 'com.google.android.gms:play-services-base:16.1.0'
                force 'com.google.firebase:firebase-core:16.0.9'
                force 'com.google.firebase:firebase-messaging:18.0.0'
        }
    }
    

    This basically forces your third party libraries(like deviceinfo) that depend on gcm, to use the 16.1.0 version.

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