ANDROID: error: unexpected element found in .

Hi.

I upgraded a proyect done on 2017.3.1 to 2018.3.1 (did a backup in case of something wrong), and now I can’t build my APK. This is the error log:

CommandInvokationFailure: Gradle build failed. 
/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseResources'.
> Android resource linking failed
  Output:  /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml:92: error: unexpected element <activity> found in <manifest>.
  
  Command: /Users/FrancoBJ/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-osx.jar/fccf37024a9d40152d6377e6cd3be5b0/aapt2-3.2.0-4818971-osx/aapt2 link -I\
          /Users/FrancoBJ/Library/Android/sdkold/platforms/android-26/android.jar\
          --manifest\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml\
          -o\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/processed_res/release/processReleaseResources/out/resources-release.ap_\
          -R\
          @/Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/incremental/processReleaseResources/resources-list-for-resources-release.ap_.txt\
          --auto-add-overlay\
          --java\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/generated/not_namespaced_r_class_sources/release/processReleaseResources/r\
          --custom-package\
          cl.Carpetres.BBOSCH\
          -0\
          apk\
          -0\
          .unity3d\
          -0\
          .ress\
          -0\
          .resource\
          -0\
          .obb\
          -0\
          data/galeria/colorlist.json\
          -0\
          data/sierragorda/galeria_bak/colorlist.json\
          -0\
          testing/activity/info/info_1.json\
          -0\
          testing/activity/info/info_2.json\
          -0\
          testing/activity/info/info_3.json\
          -0\
          testing/activity/info/info_4.json\
          -0\
          testing/activity/info/info_5.json\
          -0\
          testing/activity/info/info_6.json\
          -0\
          testing/activity/list/list_1.json\
          -0\
          testing/activity/list/list_2.json\
          -0\
          testing/activity/mes/mes_1.json\
          -0\
          testing/activity/mes/mes_10.json\
          -0\
          testing/activity/mes/mes_11.json\
          -0\
          testing/activity/mes/mes_12.json\
          -0\
          testing/activity/mes/mes_2.json\
          -0\
          testing/activity/mes/mes_3.json\
          -0\
          testing/activity/mes/mes_4.json\
          -0\
          testing/activity/mes/mes_5.json\
          -0\
          testing/activity/mes/mes_6.json\
          -0\
          testing/activity/mes/mes_7.json\
          -0\
          testing/activity/mes/mes_8.json\
          -0\
          testing/activity/mes/mes_9.json\
          -0\
          testing/cumpleanyos/list/list_1.json\
          -0\
          testing/cumpleanyos/list/list_2.json\
          -0\
          testing/cumpleanyos/mes/mes_1.json\
          -0\
          testing/cumpleanyos/mes/mes_10.json\
          -0\
          testing/cumpleanyos/mes/mes_11.json\
          -0\
          testing/cumpleanyos/mes/mes_12.json\
          -0\
          testing/cumpleanyos/mes/mes_2.json\
          -0\
          testing/cumpleanyos/mes/mes_3.json\
          -0\
          testing/cumpleanyos/mes/mes_4.json\
          -0\
          testing/cumpleanyos/mes/mes_5.json\
          -0\
          testing/cumpleanyos/mes/mes_6.json\
          -0\
          testing/cumpleanyos/mes/mes_7.json\
          -0\
          testing/cumpleanyos/mes/mes_8.json\
          -0\
          testing/cumpleanyos/mes/mes_9.json\
          -0\
          testing/encuesta/encuestalistjson.json\
          -0\
          testing/encuesta/encuesta_id0.json\
          -0\
          testing/encuesta/encuesta_id0_not.json\
          -0\
          testing/encuesta/encuesta_id1.json\
          -0\
          testing/encuesta/encuesta_id2.json\
          -0\
          testing/encuesta/encuesta_id3.json\
          -0\
          testing/galeria/galeriaitemsdata.json\
          -0\
          testing/galeria/galeriamesesfotodata.json\
          -0\
          testing/galeria/galeriamesesvideodata.json\
          -0\
          testing/galeria/foto_galerialist.json\
          -0\
          testing/galeria/video_galerialist.json\
          -0\
          testing/migasco/360/360json.json\
          -0\
          testing/migasco/cultura/culturajson.json\
          -0\
          testing/migasco/nuevospadres/nuevospadresjson.json\
          -0\
          testing/migasco/organigramas/orgjson.json\
          -0\
          testing/migasco/presencianacional/baseempresasjson.json\
          -0\
          testing/migasco/presencianacional/edsjson.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_1.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_2.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_3.json\
          -0\
          testing/migasco/presencianacional/empresasjson.json\
          -0\
          testing/migasco/presencianacional/plantajson_01.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_1.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_2.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_3.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_4.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_5.json\
          -0\
          testing/migasco/presencianacional/presenciajson.json\
          -0\
          testing/migasco/presencianacional/sedesjson.json\
          -0\
          testing/noticia/nottest_1.json\
          -0\
          testing/noticia/nottest_2.json\
          -0\
          testing/noticia/nottest_3.json\
          -0\
          testing/noticia/nottest_4.json\
          -0\
          testing/profile/profiletest.json\
          -0\
          testing/sura/clubsura/clubinfojson_0.json\
          -0\
          testing/sura/clubsura/clubinfojson_1.json\
          -0\
          testing/sura/clubsura/clubinfojson_2.json\
          -0\
          testing/sura/clubsura/clubinfojson_3.json\
          -0\
          testing/sura/clubsura/clubinfojson_4.json\
          -0\
          testing/sura/clubsura/clubinfojson_5.json\
          -0\
          testing/sura/clubsura/clubinfojson_6.json\
          -0\
          testing/sura/clubsura/clubinfojson_7.json\
          -0\
          testing/sura/clubsura/clubinfojson_8.json\
          -0\
          testing/sura/clubsura/clubinfojson_9.json\
          -0\
          testing/sura/clubsura/clubsurajson.json\
          -0\
          testing/sura/culturasura/culturasuracreencias.json\
          -0\
          testing/sura/culturasura/culturasuraliderazgo.json\
          -0\
          testing/sura/culturasura/culturasuraprincipios.json\
          -0\
          testing/sura/culturasura/culturasuravivimos.json\
          -0\
          testing/sura/estrategia2020/culturajson.json\
          -0\
          testing/sura/estrategia2020/estrategiajson.json\
          -0\
          testing/sura/estrategia2020/iniciativasjson.json\
          -0\
          testing/sura/estrategia2020/pilaresjson.json\
          -0\
          testing/sierragorda/seguridad_json.zip\
          -0\
          testing/sierragorda/austeridad/austeridadjson.json\
          -0\
          testing/sierragorda/beneficios/beneficiosconveniosjson.json\
          -0\
          testing/sierragorda/beneficios/beneficiosformulariosjson.json\
          -0\
          testing/sierragorda/beneficios/beneficiossaludjson.json\
          -0\
          testing/sierragorda/beneficios/ejemplo/0_ejemplo.json\
          -0\
          testing/sierragorda/beneficios/ejemplo/5_ejemplo.json\
          -0\
          testing/sierragorda/cultura/culturajson.json\
          -0\
          testing/sierragorda/quienessomos/0_equipojson.json\
          -0\
          testing/sierragorda/quienessomos/1_equipojson.json\
          -0\
          testing/sierragorda/quienessomos/equipolistjson.json\
          -0\
          testing/sierragorda/quienessomos/gerencialistjson.json\
          -0\
          testing/sierragorda/resultados/resultadosjson.json\
          -0\
          testing/sierragorda/seguridad/seguridadcampanyasjson.json\
          -0\
          testing/sierragorda/seguridad/seguridadincidentedetallejson.json\
          -0\
          testing/sierragorda/seguridad/seguridadlistaincidentesjson.json\
          -0\
          testing/sierragorda/seguridad/seguridadobservadoresjson.json\
          -0\
          testing/sierragorda/seguridad/seguridadrepresentantesjson.json\
          -0\
          testing/sierragorda/seguridad/incidentes/10_incidente.json\
          -0\
          testing/sierragorda/seguridad/incidentes/1_incidente.json\
          -0\
          testing/sierragorda/seguridad/incidentes/2_incidente.json\
          -0\
          testing/sierragorda/seguridad/incidentes/5_incidente.json\
          -0\
          testing/sierragorda/seguridad/incidentes/7_incidente.json\
          --output-text-symbols\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/symbols/release/R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.0-4818971-osx Daemon #0
  Output:  /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml:92: AAPT: error: unexpected element <activity> found in <manifest>.
      
  Command: /Users/FrancoBJ/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-osx.jar/fccf37024a9d40152d6377e6cd3be5b0/aapt2-3.2.0-4818971-osx/aapt2 link -I\
          /Users/FrancoBJ/Library/Android/sdkold/platforms/android-26/android.jar\
          --manifest\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml\
          -o\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/processed_res/release/processReleaseResources/out/resources-release.ap_\
          -R\
          @/Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/intermediates/incremental/processReleaseResources/resources-list-for-resources-release.ap_.txt\
          --auto-add-overlay\
          --java\
          /Users/FrancoBJ/Documents/DonPablo/CarpetresApp/Revision/03_BBOSCH/BBOSCH_2019-07-15/BBOSCH/Temp/gradleOut/build/generated/not_namespaced_r_class_sources/release/processReleaseResources/r\
          --custom-package\
          cl.Carpetres.BBOSCH\
          -0\
          apk\
          -0\
          .unity3d\
          -0\
          .ress\
          -0\
          .resource\
          -0\
          .obb\
          -0\
          data/galeria/colorlist.json\
          -0\
          data/sierragorda/galeria_bak/colorlist.json\
          -0\
          testing/activity/info/info_1.json\
          -0\
          testing/activity/info/info_2.json\
          -0\
          testing/activity/info/info_3.json\
          -0\
          testing/activity/info/info_4.json\
          -0\
          testing/activity/info/info_5.json\
          -0\
          testing/activity/info/info_6.json\
          -0\
          testing/activity/list/list_1.json\
          -0\
          testing/activity/list/list_2.json\
          -0\
          testing/activity/mes/mes_1.json\
          -0\
          testing/activity/mes/mes_10.json\
          -0\
          testing/activity/mes/mes_11.json\
          -0\
          testing/activity/mes/mes_12.json\
          -0\
          testing/activity/mes/mes_2.json\
          -0\
          testing/activity/mes/mes_3.json\
          -0\
          testing/activity/mes/mes_4.json\
          -0\
          testing/activity/mes/mes_5.json\
          -0\
          testing/activity/mes/mes_6.json\
          -0\
          testing/activity/mes/mes_7.json\
          -0\
          testing/activity/mes/mes_8.json\
          -0\
          testing/activity/mes/mes_9.json\
          -0\
          testing/cumpleanyos/list/list_1.json\
          -0\
          testing/cumpleanyos/list/list_2.json\
          -0\
          testing/cumpleanyos/mes/mes_1.json\
          -0\
          testing/cumpleanyos/mes/mes_10.json\
          -0\
          testing/cumpleanyos/mes/mes_11.json\
          -0\
          testing/cumpleanyos/mes/mes_12.json\
          -0\
          testing/cumpleanyos/mes/mes_2.json\
          -0\
          testing/cumpleanyos/mes/mes_3.json\
          -0\
          testing/cumpleanyos/mes/mes_4.json\
          -0\
          testing/cumpleanyos/mes/mes_5.json\
          -0\
          testing/cumpleanyos/mes/mes_6.json\
          -0\
          testing/cumpleanyos/mes/mes_7.json\
          -0\
          testing/cumpleanyos/mes/mes_8.json\
          -0\
          testing/cumpleanyos/mes/mes_9.json\
          -0\
          testing/encuesta/encuestalistjson.json\
          -0\
          testing/encuesta/encuesta_id0.json\
          -0\
          testing/encuesta/encuesta_id0_not.json\
          -0\
          testing/encuesta/encuesta_id1.json\
          -0\
          testing/encuesta/encuesta_id2.json\
          -0\
          testing/encuesta/encuesta_id3.json\
          -0\
          testing/galeria/galeriaitemsdata.json\
          -0\
          testing/galeria/galeriamesesfotodata.json\
          -0\
          testing/galeria/galeriamesesvideodata.json\
          -0\
          testing/galeria/foto_galerialist.json\
          -0\
          testing/galeria/video_galerialist.json\
          -0\
          testing/migasco/360/360json.json\
          -0\
          testing/migasco/cultura/culturajson.json\
          -0\
          testing/migasco/nuevospadres/nuevospadresjson.json\
          -0\
          testing/migasco/organigramas/orgjson.json\
          -0\
          testing/migasco/presencianacional/baseempresasjson.json\
          -0\
          testing/migasco/presencianacional/edsjson.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_1.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_2.json\
          -0\
          testing/migasco/presencianacional/edificiosjson_3.json\
          -0\
          testing/migasco/presencianacional/empresasjson.json\
          -0\
          testing/migasco/presencianacional/plantajson_01.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_1.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_2.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_3.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_4.json\
          -0\
          testing/migasco/presencianacional/presenciainfo_5.json\
          -0\
          testing/migasco/presencianacional/presenciajson.json\
          -0\
          testing/migasco/presencianacional/sedesjson.json\
          -0\
          testing/noticia/nottest_1.json\
          -0\
          testing/noticia/nottest_2.json\
          -0\
          testing/noticia/nottest_3.json\
          -0\
          testing/noticia/nottest_4.json\
          -0\
          testing/profile/profiletest.json\
          -0\
          testing/sura/clubsura/clubi<message truncated>

What is the issue here?

Thanks in advance

first take a backup of your project, after this try deleting the “Library” folder from you project directory, after doing this open your project. hopefully this will work. but this is a lil bit risky so take backup first before deleting the library folder.