gpt4 book ai didi

android - React-Native:无法解析配置 ':app:debugCompileClasspath' 的所有文件

转载 作者:行者123 更新时间:2023-12-04 23:52:40 24 4
gpt4 key购买 nike

我是 react-native 的新手,关注 Getting Started指南,现在我只是想编译我的第一个 android 应用程序。不幸的是,控制台输出:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find support-vector-drawable.aar (com.android.support:support-vector-drawable:27.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-vector-drawable/27.1.1/support-vector-drawable-27.1.1.aar
> Could not find livedata-core.aar (android.arch.lifecycle:livedata-core:1.1.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/lifecycle/livedata-core/1.1.0/livedata-core-1.1.0.aar
> Could not find viewmodel.aar (android.arch.lifecycle:viewmodel:1.1.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/lifecycle/viewmodel/1.1.0/viewmodel-1.1.0.aar
> Could not find runtime.aar (android.arch.core:runtime:1.1.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/runtime/1.1.0/runtime-1.1.0.aar

我跳过了哪些步骤?我的平台是 Windows 10 和我的 Android Phone 7.1.1。

最佳答案

我解决了只是添加:

maven { url 'https://maven.google.com' }

到:android/build.gradle

allprojects {
repositories {
maven { url 'https://maven.google.com' }
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}

我猜是gradle版本问题

关于android - React-Native:无法解析配置 ':app:debugCompileClasspath' 的所有文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52956232/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com