How to resolve gradle conflicts in android studio?

前端 未结 2 1107
傲寒
傲寒 2021-01-21 17:59

Please find my gradle file below.

As you can see its showing inn red.and if i place cursor there I get the hint as \'All com.android.support libraries must use the exac

2条回答
  •  囚心锁ツ
    2021-01-21 18:40

    This happened sometimes when we use external libraries from Github and I have faced it many times. I can notice you are using some external libraries in project. These libraries might using version 27.1.0 and you are using 26.1.0. Solution to this problem is either remove those libraries or change your version from 26.1.0 to 27.1.0

    and If you trying latest version, don't forgot to do following:

    allprojects {
        repositories {
            google()
    
            // If you're using a version of Gradle lower than 4.1, you must instead use:
            // maven {
            //     url 'https://maven.google.com'
            // }
            // An alternative URL is 'https://dl.google.com/dl/android/maven2/'
        }
    }
    

提交回复
热议问题