目录

 

 

​java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex​

​Could not resolve all files for configuration ':app:debugCompileClasspath'.> Could not find com.android.support:appcompat-v7:26.0.2.​

​ERROR: Failed to resolve: com.github.z2wenfa:SpinnerEditText:1.0.1​


java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

这就是你的build.gradle (app)  里面依赖的问题,好好看看你的修改,实在不行,会退下代码看看区别,在加入依赖,有可能是你的误操作,删除了某个小符号,你没看到罢了。

 

 

Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.android.support:appcompat-v7:26.0.2.

 

Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.android.support:appcompat-v7:26.0.2.
Searched in the following locations:
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.pom
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.jar
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.pom
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.jar
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.pom
file:/C:/Users/Administrator/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.jar
https://jitpack.io/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.pom
https://jitpack.io/com/android/support/appcompat-v7/26.0.2/appcompat-v7-26.0.2.jar

 

这里的错误是说明:这个com.android.support:appcompat-v7:26.0.2.找不到,导致他下面恶的 很多的东西找不到;android studio 在本地SDK中找不到

在project中增加:

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

 

或者:google()

 

ERROR: Failed to resolve: com.github.z2wenfa:SpinnerEditText:1.0.1

在project中增加:maven { url 'https://jitpack.io' }