安卓遇到:Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3) 解决方案

àì夳堔傛蜴生んèń 2024-02-18 22:54 98阅读 0赞

项目启动突然遇到:

Could not find runtime.aar (android.arch.lifecycle:runtime:1.0.3).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.3/runtime-1.0.3.aar
搞了半天 找到解决办法 :

在Build.gradle 中 :

  1. buildscript {
  2. repositories {
  3. jcenter()
  4. mavenCentral()
  5. maven { url 'https://maven.fabric.io/public' }
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:2.3.3'
  9. classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'
  10. classpath 'com.google.gms:google-services:3.1.0'
  11. classpath 'io.fabric.tools:gradle:1.+'
  12. // NOTE: Do not place your application dependencies here; they belong
  13. // in the individual module build.gradle files
  14. }
  15. }
  16. allprojects {
  17. repositories {
  18. maven { url 'https://maven.google.com' }
  19. maven { url 'https://tokbox.bintray.com/maven' }
  20. maven { url "https://jitpack.io" }
  21. jcenter() //在上面
  22. mavenCentral() //在下面
  23. }
  24. }

个人GitHub: https://github.com/HuaDanJson

发表评论

表情:
评论列表 (有 0 条评论,98人围观)

还没有评论,来说两句吧...

相关阅读