Android Studio 3.0 Beta 1: Failed to resolve: com.android.support:multidex:1.0.2

后端 未结 11 1729
陌清茗
陌清茗 2021-01-31 08:36

After migrating from Android Studio 3.0 (Canary 5) to Android Studio 3.0 (Beta 1), and moving to latest gradle , i.e. \'com.android.tools.build:gradle:3.0.0-beta1\'

相关标签:
11条回答
  • 2021-01-31 08:44

    If none of the above solutions are working then add mavenLocal() :

    allprojects {
        repositories {
            jcenter()
                   maven {
                url 'https://maven.google.com'
            }
    
            mavenLocal()
            google()
        }
    }
    
    0 讨论(0)
  • 2021-01-31 08:44

    Move the google() item up to make sure it's before the jcenter().

    repositories {
        jcenter()
        google()
    }
    
    0 讨论(0)
  • 2021-01-31 08:46

    Update all the gradle dependencies to latest version .. That’s it

    0 讨论(0)
  • 2021-01-31 08:47

    if you are in China, Please use

    allprojects {
        respositories {
            google()
        }
    }
    

    to instead

    allprojects {
        respositories {
            maven {
                url 'https://maven.google.com'
            }
        }
    }
    

    don't ask me why, I don't want to tell you.... may be 'https://maven.google.com' was selected by GFW?

    0 讨论(0)
  • 2021-01-31 08:50

    First you need to clean the project , and then rebuild it.

    Build ----> Clean Project

    Build ----> Rebuild Project

    0 讨论(0)
  • 2021-01-31 08:50
    allprojects {
        repositories {
            google()
        }
    }
    

    worked for me instead of

    allprojects {
        repositories {
            maven {
                url 'https://maven.google.com'
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题