小编AJ *_*spi的帖子

无法解决 Retrofit2 的依赖关系

我尝试将改造库导入到我的 gradle 文件中,但不幸的是,我面临太多错误。

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0.
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0.
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0.
Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0.
Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0.
Run Code Online (Sandbox Code Playgroud)

编辑 这是我的应用程序 build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example.practice"
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes { …
Run Code Online (Sandbox Code Playgroud)

android gradle retrofit2

-1
推荐指数
1
解决办法
9438
查看次数

标签 统计

android ×1

gradle ×1

retrofit2 ×1