com.android.support:multidex,gradle: Could not find com.android.support:multidex:1.0.1

当使用Gradle 2.1或2.4构建Android项目时,遇到找不到com.android.support:multidex:1.0.1的问题。解决方案包括安装Android Support Repository、替换为maven仓库或者同时安装Android Support Library。务必检查构建配置以确保正确引用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):

问题:

when I use gradle(version 2.1 or 2.4) building Android Project, get the error below. I can not find com.android.support:multidex:1.0.1 in my files.

ERRORS: config is set to BF688C717A5C3A69FE8CA522643C0A68 config is set to PRODUCT vcode is set to 151 vname is set to 1.5.1 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':XXXX'. Could not resolve all dependencies for configuration ':yizhangtong:_rendepeng_lmDebugCompile'. Could not find com.android.support:multidex:1.0.1. Searched in the following locations: ............. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 30.178 secs

回答1:

You need to install "Android Support Repository" from the Android SDK manager. (a.k.a extra-android-m2repository if installing from the command line) **OR**

You need to install "Android Support Library(Obsolete)" from the Android SDK manager.

回答2:

This issue exists in Android studio Beta versions The only solution is to use repositories { maven { url 'https://maven.google.com' } }

in project gradle file

回答3:

Installing both Android Support Library and Local Maven Repository for Support Libraries from the Android SDK manager (Extras section) fixed this issue for me.

回答4:

sdkmanager "extras;android;m2repository"

The SDK manager will install the m2 repository

回答5:

I fixed it by adding google() in allprojects node on top-level build.gradle file. Here is my top level file for reference buildscript { repositories { jcenter() mavenLocal() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' } } allprojects { repositories { jcenter() google() } }

回答6:

try compile 'com.android.support:multidex:1.0.0'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值