Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – beginner Gradle error “dependency’s AAR metadata”

Posted on November 11, 2022 By

Solution 1 :

compileSdkVersion and targetSdkVersion You have to get it to level 31

Version 28 (intended for Android Pie and below) is the last version of the legacy support library, so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward.

Old:

implementation 'com.android.support:design:26.0.0'

New:

implementation 'com.google.android.material:material:1.6.1'

You can update the file like this:

android {
    compileSdkVersion 31
    defaultConfig {
        applicationId "com.example.tablayout"
        minSdkVersion 19
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner defaultTestInstrumentationRunner
    }

    buildTypes {
        release {

            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies { 
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'com.google.android.material:material:1.6.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    testImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

Problem :

this my Gradle

plugins {
    id 'com.android.application'
}
android {
    compileSdkVersion 26
    buildToolsVersion '29.0.2'
    defaultConfig {
        applicationId "com.example.tablayout"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner defaultTestInstrumentationRunner
    }

    buildTypes {
        release {

            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies { 

    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'com.android.support:design:26.0.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    testImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

this output:

The minCompileSdk (31) specified in a dependency’s AAR metadata
(META-INF/com/android/build/gradle/aar-metadata.properties) is greater
than this module’s compileSdkVersion (android-26). Dependency:
androidx.appcompat:appcompat:1.4.2.

Comments

Comment posted by ianhanniballake

The error message seems pretty clear – your

READ  [FIXED] android - Throw java.io.IOException: unexpected end of stream on http:/ when i try to download txt file from server
Powered by Inline Related Posts
Android Tags:android, android-studio, gradle

Post navigation

Previous Post: [FIXED] Android ACTION_VIEW intent is not opening urls in non-browser apps like twitter and instagram
Next Post: [FIXED] android – Check if activity is active, and if active pass data from service to activity?

Related Posts

[FIXED] gradle – ERROR: Failed to resolve: com.google.android.gms:play­-services-­ads:18.3.0 Android
[FIXED] android – Flutter: What are the ways of making “lists” without having its own scroll? Android
[FIXED] android – Remove BasicTextField Indicator Bulb in Jetpack Compose? Android
[FIXED] android – Background colour behind Title and Icon of BottomNavigationView Android
[FIXED] java – How to change location of Textview Android
[FIXED] android – how to get values from interface set by adapter in main activity Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme