如何为旧项目更新Gradle文件中的依赖项?

我刚刚从github克隆了一个项目,但这是使用sdk 22完成的。现在我们使用的是sdk 29,因此我想将依赖项升级到28。我将graddle文件中的所有内容都从22更改为28.0.0,但是当我同步文件时,找不到依赖项。我已安装SDK 28。那么执行此操作的正确方法是什么。谢谢 这是github上的项目。最近更新了 https://github.com/nkanaev/bubble

这是gradle文件

apply plugin: 'com.android.application'

repositories {
    mavenCentral()
    mavenLocal()
}

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.0'

    defaultConfig {
        applicationid "com.nkanaev.comics"
        minSdkVersion 22
        targetSdkVersion 28

        versionName "1.6.0"
        versionCode 7
    }

    buildTypes {
        debug {
            applicationidSuffix '.debug'
            versionNameSuffix '-DEBUG'
        }
    }

    packagingOptions {
        exclude 'Meta-INF/DEPENDENCIES'
        exclude 'Meta-INF/DEPENDENCIES.txt'
        exclude 'Meta-INF/LICENSE'
        exclude 'Meta-INF/LICENSE.txt'
        exclude 'Meta-INF/NOTICE'
        exclude 'Meta-INF/NOTICE.txt'
    }
}

dependencies {
    implementation fileTree(dir: 'libs',include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.github.junrar:junrar:0.7'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'org.apache.commons:commons-compress:1.12'
    implementation 'org.tukaani:xz:1.5'
    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'
}
hewei600 回答:如何为旧项目更新Gradle文件中的依赖项?

.deps.json添加到构建脚本中的存储库。并确保您的SDK Manager中的SDK目标是最新的。

Google
本文链接:https://www.f2er.com/3115698.html

大家都在问