Failed to resolve: support-fragment error when add google architecture component dependency

前端 未结 6 1525
青春惊慌失措
青春惊慌失措 2021-02-14 07:16

I want to use Google architecture components in my app, but after updating android studio to version 3.1.1 when I add android.arch.lifecycle:extensions:1.1.1 depend

6条回答
  •  梦谈多话
    2021-02-14 07:46

    I also had to remove the maven url from the project build.gradle as in:

     buildscript {
            repositories {
                google()
                jcenter()
              //  maven { url 'https://maven.google.com' }
            }
            dependencies {
                classpath 'com.android.tools.build:gradle:3.1.3'
    
            }
        }
    
        allprojects {
            repositories {
                google()
                jcenter()
            }
        }
    

    This now works for me.

提交回复
热议问题