我正在尝试建立一个应用程序与下面的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'发布于 2018-03-27 21:57:06
你在classpath中使用过google服务插件吗?如果没有,请在位于应用程序文件夹之外的build.gradle中书写
classpath 'com.google.gms:google-services:3.0.0'我想这会帮助你的..!!
发布于 2019-06-10 20:40:25
我遇到了同样的问题,我通过从你的设备(例如,你的移动设备)上卸载应用程序[yourapp.apk],然后再次运行react-native run-android来解决这个问题,它就像一个护身符一样工作。
但是为什么呢?是因为你已经在你的设备上安装了同名的应用程序(主要是因为你已经从某个地方下载了它--现在你想运行同名的test.app,所以这就是你遇到这个错误的原因
如果它对你不起作用,请不要犹豫地问我任何问题!
https://stackoverflow.com/questions/49508836
复制相似问题