提问者:小点点

无法解析app@debugAndroidTest/compileClasspath的依赖关系


无法解析':app@debugAndroidTest/compileClasspath'的依赖项:无法解析com.android.support. test.espresso:espresso-idling-Resource:3.0.2。

这是有关android studio版本的信息:

Android Studio 3.2.1 Build#AI-181.5540.7.32.5056338,构建于2018年10月9日JRE: 1.80_152-release ase-1136-b06 amd64JVM:OpenJDK 64位服务器VMJetBrains s.r.o Windows 10 10.0

这是gradle项目:

buildscript {
   repositories {
  google()
jcenter()
 }
 dependencies {  classpath 'com.android.tools.build:gradle:3.2.1' } }}
allprojects {repositories { jcenter() maven {  url "https://maven.google.com"}}}
task clean(type: Delete) { delete rootProject.buildDir}

这是GradleAPP

apply plugin: 'com.android.application'
android { compileSdkVersion 28   defaultConfig { 
 applicationId "com.example.alyossrgf.myapplication"
 minSdkVersion 15
targetSdkVersion 28
versionCode 1
 versionName "1.0"
 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}
 buildTypes {   release {  minifyEnabled false 
 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }}}
dependencies {
 implementation fileTree(dir: 'libs', include: ['*.jar'])
 implementation 'com.android.support:appcompat-v7:28.0.0'
 implementation 'com.android.support.constraint:constraint-layout:1.1.3'
 testImplementation 'junit:junit:4.12'
 androidTestImplementation 'com.android.support.test:runner:1.0.2'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}

可以帮助解决此错误

无法解析app@debugAndroidTest/compileClasspath的依赖关系:无法解析com.android.support. test.espresso:espresso-idling-Resource:3.0.2。


共1个答案

匿名用户

也许你应该让项目变得干净(Build-