我正在尝试使用以下 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.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'
最佳答案
您是否也在类路径中使用过谷歌服务插件?
如果没有,请写在位于 app 文件夹外的 build.gradle
classpath 'com.google.gms:google-services:3.0.0'
我想这会帮助你..!!
关于react-native - React Native 命令行 'processDebugGoogleServices' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49508836/