首页 > 解决方案 > 无法解决:com.github.KwabenBerko:News-API-Java:1.0.0

问题描述

代码

安卓 { compileSdk 31

defaultConfig {
    applicationId "com.example.newsapi"
    minSdk 21
    targetSdk 31
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

}

依赖{

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.github.KwabenBerko:News-API-Java:1.0.0'

}

问题 我正在使用我在项目的 build.gradle(module level) 中实现的 NewsApi。但它正在抛出 ---> 无法解决:com.github.KwabenBerko:News-API-Java:1.0.0

标签: androidgradlebuild.gradle

解决方案


推荐阅读