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
Installing both Android Support Library and Local Maven Repository for Support Libraries from the Android SDK manager (Extras section) fixed this issue for me.
If you are using Android SDK command line tools, type:
The SDK manager will install the m2 repository
This issue exists in Android studio Beta versions The only solution is to use
in project gradle file
You need to install "Android Support Repository" from the Android SDK manager. (a.k.a
extra-android-m2repository
if installing from the command line)You need to install "Android Support Library(Obsolete)" from the Android SDK manager.
I fixed it by adding
google()
inallprojects
node on top-level build.gradle file. Here is my top level file for referencetry
compile 'com.android.support:multidex:1.0.0'