我的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
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的依赖区
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'
}
项目级别build.gradle
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
答案 0 :(得分:0)
使用implementation 'com.github.AnchorFreePartner:hydra-sdk-android:2.3.0'
代替
implementation 'com.github.AnchorFreePartner.hydra-sdk-android:sdk:2.3.0'