2

The error shown to me when upgrading the gradle my sdk is 28 but i want to upgrade be 9+ andriod version not support.

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

Error

>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>
Mukesh Kumar Singh
  • 4,512
  • 2
  • 22
  • 30
MalikFayaz
  • 21
  • 1
  • 6

2 Answers2

2

In Android Studio, go to Refactor->Migrate to AndroidX...

user2836202
  • 641
  • 3
  • 12
  • If you migrated you wouldn't have anything like `com.android.support:appcompat-v7:29.0.1`. You would have something like `androidx.appcompat:appcompat:1.0.0` – user2836202 Aug 08 '19 at 12:32
1

Following artifacts don't exist:

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'

Last support library version is 28.0.0 as you can see here:

Update the compileSdkVersion and buildToolsVersion to API 29 but keep the support library at version 28.0.0.

However, as you can see, support library is now frozen at version 28. So, it is somehow deprecated. So, another option is to migrate your project to AndroidX. It is basically the support library with a new name (putting in very simple words).

guipivoto
  • 18,327
  • 9
  • 60
  • 75
  • I have migrated to androidX. Can u let me know what are the latest versions are preferrable for the projectSupportLibraryVersion, projectMinSdkVersion, projectSdkVersion, projectBuildToolsVersion – sejn Sep 08 '20 at 14:00