无法解析本机反应中配置“:app:debugCompileClasspath”的所有文件

Jus*_*ner 7 android react-native

我在使用react-native init设置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
Run Code Online (Sandbox Code Playgroud)

关于如何让它发挥作用有什么想法吗?我尝试了所有可能的问题,但似乎没有一个有效!

Jus*_*ner 5

这有效!只需将 google() 在模块的 build.gradle 中的 allprojects > 存储库中从底部移动到顶部即可。参考-> /sf/answers/3706550221/