如何在 react-native 中为 FCM 解决这个未找到的消息
How to resolve this not found message for FCM in react-native
失败:构建失败,出现异常。
- 出了什么问题:
任务 ':react-native-firebase_app:compileDebugJavaWithJavac' 执行失败。
Could not resolve all files for configuration ':react-native-firebase_app:debugCompileClasspath'.
Could not find firebase-common-19.3.0.jar (com.google.firebase:firebase-common:19.3.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.jar
尝试:
运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
- 获取更多帮助
16 秒内构建失败
error 应用安装失败。确保您已设置 Android 开发环境:https://reactnative.dev/docs/environment-setup。 运行 带有 --verbose 标志的 CLI 以获取更多详细信息。
错误:命令失败:./gradlew app:installDebug -PreactNativeDevServerPort=8081
注意:某些输入文件使用或覆盖已弃用的 API.
只需将 maven 移动到 android/build.gradle
上的上述存储库
存储库应该是这样的:
allprojects {
repositories {
mavenLocal()
maven { url 'https://maven.google.com' }
google()
jcenter()
...
}
}
失败:构建失败,出现异常。
- 出了什么问题: 任务 ':react-native-firebase_app:compileDebugJavaWithJavac' 执行失败。
Could not resolve all files for configuration ':react-native-firebase_app:debugCompileClasspath'. Could not find firebase-common-19.3.0.jar (com.google.firebase:firebase-common:19.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.jar
尝试: 运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
- 获取更多帮助
16 秒内构建失败
error 应用安装失败。确保您已设置 Android 开发环境:https://reactnative.dev/docs/environment-setup。 运行 带有 --verbose 标志的 CLI 以获取更多详细信息。 错误:命令失败:./gradlew app:installDebug -PreactNativeDevServerPort=8081 注意:某些输入文件使用或覆盖已弃用的 API.
只需将 maven 移动到 android/build.gradle
存储库应该是这样的:
allprojects {
repositories {
mavenLocal()
maven { url 'https://maven.google.com' }
google()
jcenter()
...
}
}