我讨厌使用expo时使用react-native初始化设置React Native,然后尝试运行react-native run-android。 但是,我在这里遇到了这样的问题:
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
关于如何使它工作的任何想法?我尝试了所有可能的问题,但似乎都没有问题!
答案 0 :(得分:4)
这有效! 只需在模块的build.gradle中的所有项目>存储库中将google()从底部移到顶部。 参考-> https://stackoverflow.com/a/52950717/8237551
答案 1 :(得分:0)
就我而言,我必须执行以下操作
cordova plugin add cordova-android-support-gradle-release --fetch
从我的插件中删除cordova-plugin-add-swift-support
使用了https://cordova.apache.org/news/2017/11/10/plugins-release.html
此处提到的版本删除cordova-plugin-compat
最后移到顶部
maven {
url "https://maven.google.com"
}
或
google()