0

esperando que todos se encuentren muy bien, ha aquí molestando nuevamente, les comento que estoy realizando mi pri8mer proyecto en android studio, llevaba como cinco formularios hechos muy bien, después quise volver al principio, y lo primero que me surgió como errores fueron las pantallas, todas se volvieron chicas "me refiero a los edittext y buttons", los cuales ya los solucione, pero ahora desde el viernes que quiero ejecutarlo y me da estos errores: 6 issues were found when checking AAR metadata:

  1. Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  2. Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32.

    Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  3. Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32.

    Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  4. Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32.

    Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  5. Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32.

    Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  6. Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

    :app is currently compiled against android-32.

    Also, the maximum recommended compile SDK version for Android Gradle plugin 7.2.1 is 32.

    Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 33.

    Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). este son las dependencias que se utiliza en el build.gradle (modulo)

plugins {
id 'com.android.application'
}

android {
compileSdk 32

defaultConfig {
    applicationId "com.example.oficina1"
    minSdk 16
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

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 'com.android.volley:volley:1.2.1'
implementation fileTree(dir: 'libs', includes: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'androidx.annotation:annotation-experimental:1.3.0'
implementation 'androidx.core:core-ktx:1.8.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

además ingreso el buid.gradle (proyecto), ya que no entiendo si piden el 7.2.1 y está en false:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Por otro lado, les comento que no he bajado la API 33, ya que averiguando a través de la web que todavía no es muy confiable y porque siempre dice de los errores que la 33 no entiendo, lo otro poseo el android studio chipmunk 2021.2.1 patch1, ahora menciona que debo actualizarla al ielectric del 2022, sino funciona bien creo que no es conveniente actualizarla, ojala que me puedan ayudar y asesorar, desde ya muchas gracias.

2 respuestas 2

1

El mensaje de error indica el problema.

Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs.

Algunas de tus dependencias/bibliotecas necesitan como mínimo ser compiladas con Android 13 (nivel de API 33), debes definir en tu archivo app/build.gradle el uso de este nivel de API tanto para compileSdkVersion como para targetSdkVersion :

 android {
    compileSdkVersion 33
    ...
    ...
    defaultConfig {
       ...
       ...  
       targetSdkVersion 33
1

Hay dos formas de corregir este error:

  1. Aumente los valores de compileSdka en el archivo (nivel de la aplicación).targetSdk32 33 build.gradle

  2. (No recomendado) Reduzca las dependencias build.gradlea los valores antiguos:

implementation 'androidx.core:core-ktx:1.8.0' 

implementation 'androidx.appcompat:appcompat:1.5.0'

Después de estos cambios, vuelva a sincronizar el proyecto con los archivos de Gradle.

Pero lo mejor es usar la primera forma, ya que es necesario que sea compatible con Android 13 .

Asi es como deveria quedarte :) introducir la descripción de la imagen aquí

4
  • Bienvenido. El texto es más cómodo de leer y de copiar. Con esto quiero decir que uses imágenes solo cuando no puedas decir lo mismo con palabras. Así que, copia y pega el código por favor. No te cuesta nada.
    – Mateo
    el 4 feb. a las 0:24
  • Reducir las versiones de las dependencias no lo podría como solución, ya que en algún momento se obligaría tu proyecto a actualizar y tu proyecto podría no compilar con algunas versiones de tus dependencias.
    – Jorgesys
    el 4 feb. a las 3:04
  • @Mateo muchas gracias por tus comentarios
    – Hector
    el 6 feb. a las 20:43
  • @Jorgesys muchas gracias, no las reduje del todo, y lo que hice subí de 32 a 33 como me lo recomendaron y ahora estoy trabajando sin problema
    – Hector
    el 6 feb. a las 20:44

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.