country_codes icon indicating copy to clipboard operation
country_codes copied to clipboard

:country_codes:processDebugManifest failed.

Open gobi-G opened this issue 7 months ago • 1 comments

Error Message:

` Execution failed for task ':country_codes:processDebugManifest'.

A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction com.android.manifmerger.ManifestMerger2$MergeFailureException: Error parsing /Users/gobiganjeyamoorthy/.pub-cache/hosted/pub.dev/country_codes-3.1.0+2/android/src/main/AndroidManifest.xml `

Steps to Reproduce

  1. Update Gradle to version 8.3.1.
  2. Run the build process for the project.
  3. Observe the error occurring during the :country_codes:processDebugManifest task.

Expected Behavior The build process should complete successfully without errors.

Observed Behavior The build fails with the ManifestMerger2$MergeFailureException while parsing the AndroidManifest.xml file for the country_codes package.

Build Environment Flutter Version: 3.19.6 Dart Version: 3.3.4 Operating System: macOS Gradle Version: 8.3.1

Android Gradle Plugin Version:

  • Android Studio Iguana | 2023.2.1 Patch 1
  • Build #AI-232.10300.40.2321.11567975, built on March 13, 2024
  • Runtime version: 17.0.9+0-17.0.9b1087.7-11185874 aarch64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • macOS 14.2.1
  • GC: G1 Young Generation, G1 Old Generation
  • Memory: 4096M
  • Cores: 8
  • Metal Rendering is ON
  • Non-Bundled Plugins:
  • Dart (232.10305)
    

Country Codes Package Version: 3.1.0

Steps Taken to Troubleshoot

  1. Checked for syntax errors in the AndroidManifest.xml file.
  2. Ensured all dependencies are up to date.
  3. Cleaned and rebuilt the project.
  4. Verified correct Gradle and Android Gradle Plugin versions.
  5. Attempted to downgrade Gradle and Android Gradle Plugin to previous working versions.

Additional Context This issue started occurring after updating Gradle to version 8.x.x. It seems to be related to how Gradle handles the AndroidManifest.xml file parsing in this version. Previous Gradle versions did not produce this error.

Possible Solution Please provide any known solutions or workarounds for resolving the ManifestMerger2$MergeFailureException when processing the AndroidManifest.xml file for the country_codes package, particularly in the context of using Gradle 8.x.x.

gobi-G avatar Jul 23 '24 12:07 gobi-G