要在现有项目上运行 yarn run android
我会收到以下错误
java.lang.NullPointerException (no error message)
但是如果我删除下面的代码形式 build.gradle
执行{
commandLine 'security', '-q', 'find-generic-password', '-a',
当前用户,'-s', key 链,'-w'
标准输出 = 标准输出
错误输出 = 标准错误
ignoreExitValue 真
}
并运行 ./gradlew --debug 它返回构建
BUILD SUCCESSFUL
如果我再次运行
yarn run android
我收到以下错误
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDevDebugGoogleServices'.
File google-services.json is missing. The Google Services Plugin
cannot function without it.
你知道我为什么会收到这个错误吗?
最佳答案
看起来您正在您的应用中使用 Google 服务。您需要从 Google 开发者网站获取一个 json 文件。
关于android - react native 运行-android问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49512279/