无法解析“”的依赖项:app@debugAndroidTest/compileClasspath':
我现在正在使用Android Studio 3.0,我刚刚在上面创建了一个项目gradle离线工作已经被禁用了,它说无法解析“”的依赖项:app@debugAndroidTest/compileClasspath':,android,Android,我现在正在使用Android Studio 3.0,我刚刚在上面创建了一个项目gradle离线工作已经被禁用了,它说 Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1. <a href="openFile:C:/Users/ivan/And
Error:Unable to resolve dependency for
':app@debugAndroidTest/compileClasspath': Could not resolve
com.android.support:appcompat-v7:26.0.0-beta1.
<a href="openFile:C:/Users/ivan/AndroidStudioProjects/Notification/app/build.gradle">Open File</a><br><a href="Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1.">Show Details</a>
从appcompat支持库依赖项中删除-beta1:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}
然后,同步您的项目。将com.android.support:appcompat-v7:26.0.0-beta1替换为com.android.support:appcompat-v7:26.0.0在androidits下载中有何新功能?可以吗?应该有。@Ivan–在stackoverflow.com上,如果有答案对您有帮助,请确保将其标记为“正确答案”,并向上致谢!
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}