Android Studio最新版本3.4.1未实现任何最新依赖关系。

时间:2019-06-10 06:20:43

标签: android android-studio android-support-library

我下面尝试在项目中添加以下依赖项(最新版本)。

对于网络:

实现'com.squareup.okhttp3:okhttp:4.0.0-RC1'

对于可扩展大小:

实现'com.intuit.sdp:sdp-android:1.0.6'

使用最新版本时,我无法同步该项目,但是当我尝试使用旧版本时,它可以正常工作。

错误日志:

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath':
Could not resolve com.squareup.okhttp3:okhttp:4.0.0-RC1.

ROOT LEVEL build.gradle

buildscript {
ext.kotlin_version = '1.3.31'
repositories {
    mavenCentral()
    google()
    jcenter()
    }
dependencies {
    classpath 'com.android.tools.build:gradle:3.4.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}}allprojects {
repositories {
    google()
    jcenter()

}}task clean(type: Delete) {
delete rootProject.buildDir}

APP LEVEL build.gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28

defaultConfig {
    applicationId "com.example.kotlinapp"
    minSdkVersion 22
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }}}dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
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'
//for size
implementation 'com.intuit.sdp:sdp-android:1.0.6'
//for network call
implementation 'com.squareup.okhttp3:okhttp:4.0.0-RC1'
}

Android Studio的最新版本有什么问题?

0 个答案:

没有答案