Build failed with an exception react native

前端 未结 2 1823
北恋
北恋 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

    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.

提交回复
热议问题