[英]react native app build failing for react-native firebase
we have "react-native-firebase": "4.2.0", after installing npm modules and try to run the app then we are getting this issue 我们安装了npm模块并尝试运行该应用程序后,具有“ react-native-firebase”:“ 4.2.0”,然后出现此问题
FAILURE: Build failed with an exception. 失败:构建失败,发生异常。
What went wrong: Could not resolve all files for configuration ':app:debugCompileClasspath'. 出了什么问题:无法解析配置':app:debugCompileClasspath'的所有文件。
Could not find firebase-auth.aar (com.google.firebase:firebase-auth:15.1.0).
找不到firebase-auth.aar(com.google.firebase:firebase-auth:15.1.0)。 Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-auth/15.1.0/firebase-auth-15.1.0.aar Could not find firebase-analytics-impl.aar (com.google.firebase:firebase-analytics-impl:15.0.2).
在以下位置搜索: https ://jcenter.bintray.com/com/google/firebase/firebase-auth/15.1.0/firebase-auth-15.1.0.aar找不到firebase-analytics-impl.aar( com.google.firebase:火力点 - 分析 - IMPL:15.0.2)。 Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-analytics-impl/15.0.2/firebase-analytics-impl-15.0.2.aar Could not find firebase-common.aar (com.google.firebase:firebase-common:15.0.1).
在以下位置搜索: https ://jcenter.bintray.com/com/google/firebase/firebase-analytics-impl/15.0.2/firebase-analytics-impl-15.0.2.aar找不到通用的firebase。 aar(com.google.firebase:firebase-common:15.0.1)。 Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar Could not find firebase-common.aar (com.google.firebase:firebase-common:15.0.1).
在以下位置搜索: https ://jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar找不到firebase-common.aar(com。 google.firebase:火力常见:15.0.1)。 Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar
在以下位置搜索: https : //jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar
Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用--info或--debug选项运行以获取更多日志输出。 Run with --scan to get full insights.
与--scan一起运行以获取完整的见解。
Get more help at https://help.gradle.org 在https://help.gradle.org上获得更多帮助
have you tried 你有没有尝试过
react-native link react-native-firebase ?
react-native链接react-native-firebase?
I do not know if this is the question, but there is no specific google firebase configuration for react-native, so you need to log in to your project inside https://console.firebase.google.com/ , access your project and go in web configurations and implement in your code. 我不知道这是否是问题,但是没有针对react-native的特定Google firebase配置,因此您需要在https://console.firebase.google.com/内登录到您的项目,访问您的项目并进行网络配置并在您的代码中实施。
ex: 例如:
componentWillMount() { firebase.initializeApp({ apiKey: "YOURAPIKEY", authDomain: "", databaseURL: "", projectId: "", storageBucket: "", messagingSenderId: "YOURKEY" });
Cheers, 干杯,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.