无法解析配置所有的依赖“:应用程序:_debugCompile”。在Android Studio中 [英] Could not resolve all dependencies for configuration ':app:_debugCompile'. in android studio
问题描述
当我运行我在Android Studio中的错误应用:在我的Android是新兴请帮助在此先感谢
When i am run my application in android studio error:I am new in android developing Please Help Thanks in advance!
我Logtag是在这里: -
My Logtag is here:-
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:recyclerview-v7:.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/recyclerview-v7//recyclerview-v7-.pom
https://jcenter.bintray.com/com/android/support/recyclerview-v7//recyclerview-v7-.jar
file:/C:/Users/ANDROID/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/recyclerview-v7//recyclerview-v7-.pom
file:/C:/Users/ANDROID/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/recyclerview-v7//recyclerview-v7-.jar
file:/C:/Users/ANDROID/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/recyclerview-v7//recyclerview-v7-.pom
file:/C:/Users/ANDROID/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/recyclerview-v7//recyclerview-v7-.jar
Required by:
ShoppingMazza:app:unspecified
Information:BUILD FAILED
Information:Total time: 4.964 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
我的build.gradle: -
My build.gradle:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.catalyst.android.shoppingmazza"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.android.support:recyclerview-v7:'
}
我在Android的新的发展请帮助在此先感谢!
I am new in android developing Please Help Thanks in advance!
推荐答案
错误:
错误:出现问题的项目配置:应用程序。不能
解析配置所有的依赖:应用程序:_debugCompile'。结果
找不到com.android.support:recyclerview-v7:
Error:A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.android.support:recyclerview-v7:.
这是错误,我可以说,你必须添加下面的依赖关系的gradle:
From error i can say you'll have to add the following gradle dependency :
compile 'com.android.support:recyclerview-v7:+'
编辑:
错误:执行失败的任务:应用程序:dexDebug。 >
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException:进程命令
C:\\ Program Files文件\\的Java \\ jdk1.8.0_51 \\斌\\ java.exe的''与完成
非零值1
Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 1
有关这个错误,我认为你正在编译 JAR
库的两倍。您正在使用
For this error i think you are compiling JAR
library twice. You are using
compile fileTree(dir: 'libs', include: ['*.jar'])
在的build.gradle
文件,所以它会编译对库的jar扩展文件夹,所有的库,以便您可以删除此行:
in build.gradle
file so it will compile all library that has jar extension on libs folder, so You can remove this lines:
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
如果问题仍然存在,那么问题是要超过由Android带来的65K方法DEX限制很可能是由于。这个问题可以通过清洁工程,去除依赖一些未使用的库和方法的build.gradle
,或通过添加 multidex 解决code>的支持。
If issue still exists then issue is quite possibly due to exceeding the 65K methods dex limit imposed by Android. This problem can be solved either by cleaning the project, and removing some unused libraries and methods from dependencies in build.gradle
, OR by adding multidex
support.
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
这篇关于无法解析配置所有的依赖“:应用程序:_debugCompile”。在Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!