使用react native googlesignin时Android构建失败
我使用的是react本地googlesignin模块 当我运行n android时,它会抛出如下错误: 这是我的build.gradle文件:使用react native googlesignin时Android构建失败,android,react-native,react-native-android,Android,React Native,React Native Android,我使用的是react本地googlesignin模块 当我运行n android时,它会抛出如下错误: 这是我的build.gradle文件: dependencies { compile project(':react-native-fbsdk') compile project(':react-native-android-permissions') compile project(':react-native-device-info') compile proje
dependencies {
compile project(':react-native-fbsdk')
compile project(':react-native-android-permissions')
compile project(':react-native-device-info')
compile project(':react-native-push-notification')
compile project(':react-native-barcodescanner')
compile project(':@remobile/react-native-splashscreen')
compile project(':react-native-camera')
compile project(':react-native-image-picker')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(":react-native-google-signin")
compile 'com.google.android.gms:play-services-auth:9.2.1' // should be at least 9.0.0
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
}
我还尝试了以下方法:
compile(project(":react-native-google-signin")){
exclude group: "com.google.android.gms" // very important
}
compile 'com.google.android.gms:play-services-auth:9.2.1' // should be at least 9.0.0
谁能告诉我如何解决这个问题。
npm link
将使用regex进行搜索,当前行为
编译(project(“:react native google sign”){
所以我们需要将其更改为
compile project(":react-native-google-signin")
{
exclude group: "com.google.android.gms" // very important
}
通过这种方式,当
npm link
将检测到依赖性并且不会被复制时您是否尝试过清理并重建您的项目?是的,我尝试过,但没有解决我的问题,通过将9.2.1的版本更改为10.2.1来解决,因为我的其他模块正在使用该版本,谢谢。