如何更新旧项目的渐变文件中的依赖项



我刚刚从github克隆了一个项目,但它是使用sdk22完成的。现在我们使用的是sdk29,所以我想将依赖关系升级到28。我将graddle文件中的所有内容从22更改为28.0.0,但当我同步文件时,它找不到依赖项。我安装了sdk28。那么,做这件事的正确方法是什么呢。谢谢这是github上的项目。最近更新了https://github.com/nkanaev/bubble

这是等级文件

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'
}

Google添加到构建脚本中的repos。请确保SDK Manager中的SDK目标是最新的。

repositories {
mavenCentral()
mavenLocal()
google()
}

最新更新