升级gradle我的sdk为28时显示给我的错误,但我想升级为9+ andriod版本,不支持。
>ERROR: Failed to resolve: com.android.support:appcompat-v7:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:design:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:cardview-v7:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:palette-v7:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:recyclerview-v7:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:support-annotations:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:exifinterface:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:support-v4:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:customtabs:28
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:appcompat-v7:29.0.1
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:design:29.0.1
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:cardview-v7:29.0.1
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:palette-v7:29.0.1
Show in Project Structure dialog
Affected Modules: app
>ERROR: Failed to resolve: com.android.support:recyclerview-v7:29.0.1
Show in Project Structure dialog
Affected Modules: app
Gradle
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13-beta-3'
implementation 'com.android.support:appcompat-v7:29.0.1'
implementation 'com.android.support:design:29.0.1'
implementation 'com.android.support:cardview-v7:29.0.1'
implementation 'com.android.support:palette-v7:29.0.1'
implementation 'com.android.support:recyclerview-v7:29.0.1'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.onesignal:OneSignal:3.11.2'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.1"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
错误
>Failed to resolve: com.android.support:appcompat-v7:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:design:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:cardview-v7:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:palette-v7:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:recyclerview-v7:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:support-annotations:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:exifinterface:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:support-v4:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:customtabs:28
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:appcompat-v7:29.0.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:design:29.0.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:cardview-v7:29.0.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:palette-v7:29.0.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
Failed to resolve: com.android.support:recyclerview-v7:29.0.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:E:/Software house/APPS/Building Apps/App 3 YourRecipesApp Online/App Model/Recipes Master/app/build.gradle">app</a>
答案 0 :(得分:1)
在Android Studio中,转到Refactor->Migrate to AndroidX...
答案 1 :(得分:1)
以下工件不存在:
Alamofire.request("https://api.trackingmore.com/v2/trackings/post", method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: headers)
.responseJSON { response in
print(response)
}
如您所见,here的最新支持库版本为implementation 'com.android.support:appcompat-v7:29.0.1'
implementation 'com.android.support:design:29.0.1'
implementation 'com.android.support:cardview-v7:29.0.1'
implementation 'com.android.support:palette-v7:29.0.1'
implementation 'com.android.support:recyclerview-v7:29.0.1'
:
将28.0.0
和compileSdkVersion
更新为API 29,但将支持库的版本保持为buildToolsVersion
。
但是,正如您所看到的,支持库现在冻结在版本28中。因此,它已经过时了。因此,另一种选择是将项目迁移到28.0.0
。基本上,它是一个支持库,带有一个新名称(用非常简单的词表示)。