Failed to resolve: android.arch.lifecycle:extensions:1.0.0-alpha1 android studio 3.0

后端 未结 7 1607
无人及你
无人及你 2021-02-05 02:09

I am building a project in android studio 3.0 with android plugin \'com.android.tools.build:gradle:3.0.0-alpha1\' and gradle version gradle-4.0-milestone-1-al

7条回答
  •  星月不相逢
    2021-02-05 02:41

    Add in app/gradle file

    compile "android.arch.lifecycle:extensions:1.0.0-alpha4"
    compile "android.arch.persistence.room:runtime:1.0.0-alpha4"
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha4"
    annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha4"
    

    add maven to project based gradle

    allprojects {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
    }
    }
    

    it will compile easily

提交回复
热议问题