Android Studio 3.0 Beta 1:无法解析:com.android.support:multidex:1.0.2 [英] Android Studio 3.0 Beta 1: Failed to resolve: com.android.support:multidex:1.0.2

查看:248
本文介绍了Android Studio 3.0 Beta 1:无法解析:com.android.support:multidex:1.0.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Android Studio 3.0(Canary 5)迁移到Android Studio 3.0(Beta 1)后,转移到最新的gradle,即'com.android.tools.build:gradle:3.0.0- beta1'

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'

当我尝试进行同步时,出现以下错误。

When I try to gradle sync, it error stating below.

Failed to resolve: com.android.support:multidex:1.0.2 
Failed to resolve: com.android.support:multidex-instrumentation:1.0.2 

我检查 Android Studio 3.0 Canary 9 - 无法解析包,它不能解决我的问题,因为我已经有了这个

I check on Android Studio 3.0 Canary 9 - Failed to resolve packages, it doesn't solve my problem, as I already have this

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

我很惊讶它甚至要求使用multidex 1.0.2,因为我只有在build.gradle中使用

I'm surprise it is even asking for multidex 1.0.2, as I only have in my build.gradle

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

我使用 ./ gradlew app:dependencies |进行检查grep multidex ,它显示了失败,如下所示(跨越各种口味等)

I check using ./gradlew app:dependencies | grep multidex, it shows the failures as below (across various flavors etc)

+--- com.android.support:multidex-instrumentation:1.0.2 FAILED
+--- com.android.support:multidex:1.0.1
+--- com.android.support:multidex:1.0.2 FAILED
+--- com.android.support:multidex:1.0.1 -> 1.0.2 FAILED

multidex:1.0.2 multidex-instrumentation:1.0.2 来自哪里?

Where did the dependencies of multidex:1.0.2 and multidex-instrumentation:1.0.2 comes from? How could I solve this problem?

推荐答案

显然我的问题是我应该发布这个:

Apparently my issue is I should post this:

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

位于 allprojects 而不在 buildscript

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

感谢MD为指针!

这篇关于Android Studio 3.0 Beta 1:无法解析:com.android.support:multidex:1.0.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆