无法解析';的依赖关系:app@debug/compileClasspath';:无法解析com.github.AnchorFreePartner.hydra sdk android:sdk:2.3.0';
我的Android Studio项目的build.gradle文件有一些问题,我无法解决。 每当我构建项目时,都会出现以下错误:无法解析';的依赖关系:app@debug/compileClasspath';:无法解析com.github.AnchorFreePartner.hydra sdk android:sdk:2.3.0';,android,Android,我的Android Studio项目的build.gradle文件有一些问题,我无法解决。 每当我构建项目时,都会出现以下错误: ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0. Show Details Affected Modules: app E
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0.
Show Details
Affected Modules: app
这是我的build.gradle的dependecies部分
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0'
implementation "com.android.support:cardview-v7:${androidSupportLibraryVersion}"
implementation "com.android.support:recyclerview-v7:${androidSupportLibraryVersion}"
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design: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'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.android.billingclient:billing:1.2.2'
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
项目级build.gradle
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0'
implementation "com.android.support:cardview-v7:${androidSupportLibraryVersion}"
implementation "com.android.support:recyclerview-v7:${androidSupportLibraryVersion}"
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design: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'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.android.billingclient:billing:1.2.2'
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
使用
implementation'com.github.AnchorFreePartner:hydra sdk android:2.3.0'
而不是
implementation'com.github.AnchorFreePartner.hydra sdk android:sdk:2.3.0'
所有项目{repositories{…maven{url”“}}}}您是否在根目录文件中添加了此项是的,您已经尝试过使用这些,但是没有一个是有效的:implementation'com.github.AnchorFreePartner.hydra sdk android:sdk:2.0.0'implementation'com.github.AnchorFreePartner:hydra sdk android:2.3.0'implementation'com.github.AnchorFreePartner.hydra sdk android:hydra:2.3.0'你试过这个步骤吗
文件->使缓存失效/重新启动
然后选择失效并重新启动