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

后端 未结 11 1731
陌清茗
陌清茗 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:50

    Adding google() in my allprojects solved my issue...

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

    my problem was network connection. I needed to connect to a vpn server to connect to jcenter

    0 讨论(0)
  • 2021-01-31 09:02

    For me, the solution is move the google() item up to make sure it's before the jcenter(). And actually, I will put the google() in the first place of all the repositories.

    0 讨论(0)
  • 2021-01-31 09:03

    Need to add the following as well:

    compile 'com.android.support:multidex:1.0.3'

    After adding the above line, it worked for me in addition to the above answer

    0 讨论(0)
  • 2021-01-31 09:09

    Apparently my issue is I should post this:

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

    in allprojects and not in buildscript (the subtle different has blinded me where the issue is), which then looks like this:

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

    Thanks to M D for the pointers!

    0 讨论(0)
提交回复
热议问题