React native React本机命令行';ProcessDebuggeGoogleServices';错误
我正在尝试使用以下build.gradle文件构建应用程序,但创建文件夹时始终出现一个错误。我检查了许多答案,但没有人在这方面帮助我React native React本机命令行';ProcessDebuggeGoogleServices';错误,react-native,react-native-android,React Native,React Native Android,我正在尝试使用以下build.gradle文件构建应用程序,但创建文件夹时始终出现一个错误。我检查了许多答案,但没有人在这方面帮助我 * What went wrong: Execution failed for task ':app:processDebugGoogleServices'. > Failed to create folder: D:\App\android\app\build\generated\res\google-services\debug 我的app/build
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to create folder: D:\App\android\app\build\generated\res\google-services\debug
我的app/build.gradle
文件
dependencies {
compile project(':react-native-android-permissions')
compile project(':react-native-push-notification')
compile project(':react-native-fbsdk')
compile project(':react-native-google-signin')
compile project(':react-native-image-resizer')
compile project(':react-native-image-picker')
compile project(':react-native-fs')
compile project(':react-native-vector-icons')
compile project(':react-native-maps')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:25.0.0"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':RNPermissionsModule')
compile(project(":react-native-google-signin")) {
exclude group: "com.google.android.gms"
}
compile(project(':react-native-fbsdk')){
exclude(group: 'com.facebook.android', module: 'facebook-android-sdk')
}
compile "com.facebook.android:facebook-android-sdk:4.22.1"
compile "com.google.android.gms:play-services-maps:11.8.0"
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:25.0.1"
compile project(':react-native-push-notification')
compile ('com.google.android.gms:play-services-gcm:11.8.0') {
force = true;
}
}
apply plugin: 'com.google.gms.google-services'
你在类路径中也使用过谷歌服务插件吗? 如果没有,请在应用文件夹外的build.gradle中写入
classpath 'com.google.gms:google-services:3.0.0'
我想这会对你有帮助 我也遇到了同样的问题,我通过从你的设备(例如:你的移动设备)上卸载应用程序
[yourapp.apk]
,然后再次运行react native run android
,解决了这个问题,效果非常好
但是为什么呢?
因为你已经在你的设备上安装了同名的应用程序(主要是因为你从某处下载了它——现在你想运行同名的test.app,所以你遇到了这个错误)
如果对您不起作用,请不要犹豫问我任何问题!我已经尝试过您的方法,但问题仍然是一样的:(