Hay*_*meh 6 android gradle react-native
当运行react-native run-android时,我收到了这个错误:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-device-info'.
> Could not find common.jar (android.arch.core:common:1.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Run Code Online (Sandbox Code Playgroud)
如果您正在使用jcenter()并maven {url "https://maven.google.com"}确保maven {url "https://maven.google.com"}首先写入(代码中的上部).
android.arch.core:common:1.0.0存在于jcenter(),但没有.jar文件,这就是为什么构建失败.使用Google Maven首先解决了这个问题,因为.jar存在于那里.
allprojects {
repositories {
maven { url 'https://maven.google.com' } // <--- This needs to be before jcenter().
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7060 次 |
| 最近记录: |