Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

21.7K
Vistas
Warning: unexpected element (uri:"", local:"base-extension") after Android Target SDK was updated to 31.0.0

After I update the target Android SDK from 30.0.3 to 31.0.0 I started to have these 2 warnings :

This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

I tried to update all the libraries but it didn't help. Anyone had this warning ?

over 4 years ago · Santiago Trujillo
6 Respuestas
Responde la pregunta

0

I had these same errors, to resolve this error, I created new project and ran this new project, i don't found same error. I resolved my problem just comparing the two codes and changing the old one codes the old project

over 4 years ago · Santiago Trujillo Denunciar

0

This is caused by using a newer version of commandline-tools to download the packages of Android SDK, while your project is probably using an older version of Gradle.

Enter your Android SDK directory and delete everything but the licenses folder. Try to rebuild your project and Gradle will redownload all the tools needed. This time the warning won't be logged.

over 4 years ago · Santiago Trujillo Denunciar

0

It sounds like you're having some issues with your Android project after updating the Target SDK. Here are a few steps you can try to fix this issue:

  1. Make sure you have the latest version of Android Studio installed. This will ensure that you have the latest tools and dependencies for working with the updated Target SDK.

  2. Check your project's build.gradle file and make sure that the compileSdkVersion and targetSdkVersion are set to the latest version (31.0.0 in this case).

  3. Clean and rebuild your project. This will ensure that all of the dependencies and build artifacts are updated to work with the new SDK version.

  4. If you're still having issues, try invalidating the caches and restarting Android Studio. This can help reset any stale dependencies or configurations that may be causing problems.

I hope these steps help! Let me know if you have any other questions.

almost 4 years ago · Juan Pablo Isaza Denunciar

0

over 1 year ago · Julian Garcia Denunciar

0

This also happened to me when I updated the targetSdkVersion to 31. Basically, it's an out-of-sync issue between the SDK version you have installed and the tools that interpret it, such as Android Studio or command-line tools. The "base-extension" warning appears because the new SDK's XML files use tags that older versions of the tools don't yet recognize.

What worked for me was the following:

  1. I have updated Android Studio to the latest stable version.

  2. I went to the SDK Manager and verified that I had installed:

    • Android SDK Platform 31

    • Android SDK Build Tools 31.x

    • Android SDK Command-line Tools (latest)

  3. I also made sure I had the Gradle plugin updated, for example using com.android.tools.build :gradle:7.xx, and used at least Gradle 7.x.

  4. Finally, I cleaned the project with the ./gradlew clean command and then rebuilt the project.

After that, the warnings disappeared. It's not a serious error, but it can be annoying if you don't have everything lined up correctly.

If you'd like, you can share your build.gradle file and I'll let you know if there's anything that might be causing a conflict.

over 1 year ago · Julian Garcia Denunciar

0

This warning usually appears because SDK 31 was installed with an older version of Android Studio or the Command-line Tools. Updating Android Studio and the SDK tools (especially the Command-line Tools) usually resolves the issue. If the build works, it's just a compatibility warning.

3 months ago · Ruben Alexander Serrano Porras Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda