Actualmente cuando creo nuevos proyectos en Android Studio, me salen estos dos errores al querer correrlos; igual si no le he hecho ninguna modificación al proyecto:
Execution failed for task ':app:mergeDebugResources'
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed. Check logs for details.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed. Check logs for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
y
ParseError at [row,col]:[8,18]
Message: Las estructuras del documento XML deben empezar y finalizar en la misma entidad.
Guardo los proyectos en la carpeta por defecto: C:\Users\ACER\AndroidStudioProjects
Mi archivo AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.listadecompras">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.ListaDeCompras">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
En mi AndroidManifest.xml está estructurado correctamente según verifico y probé el Buil -> Clean Project y Build -> Rebuild project pero no fue de ayuda. Todos los proyectos que creo intento correrlos apenas se generan pero igual saltan estos errores.
Mi archivo build.gradle:
plugins {
id 'com.android.application'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.example.shoppinglist"
minSdk 21
targetSdk 31
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 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
El día de ayer me dejaba correr los programas sin problemas y de repente se me presentan estos errores
Desde ya agradezco sus ayudas