Fatal error on android

Hi,
i’ve the following error when i compile and run the code.
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:web3auth_flutter’.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
Namespace not specified. Specify a namespace in the module’s build file. See Configure the app module  |  Android Studio  |  Android Developers for information about setting the namespace.

 If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
  • 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.

BUILD FAILED in 1s
Error: Gradle task assembleDebug failed with exit code 1

this is the setup of my mac.

Please, let us know because in few days we have to release a new version.

Gabriel

Hi Gabriel,

Thank you for providing the details. It looks like you’re encountering a build configuration issue with the Android project, specifically involving the namespace declaration.

The error message suggests that the namespace attribute is not specified in your module’s build file. Follow the guidance in the provided URLs to set the namespace:

  1. Open your build.gradle file in the :web3auth_flutter module.
  2. Add a namespace declaration like this:
    android {
        namespace 'com.yourpackage.namespace'
        ...
    }
    

Replace 'com.yourpackage.namespace' with your actual package name.

If you have already specified the package in your AndroidManifest.xml, you can use the AGP Upgrade Assistant to help with the migration. Here’s a brief set of instructions:

  1. Open the build file from Android Studio.
  2. Find and click on the AGP Upgrade Assistant, usually found under Tools > AGP Upgrade Assistant.
  3. Follow the steps and apply the suggested changes.

In case the problem persists, running the Gradle build with additional flags like --stacktrace, --info, or --debug can provide more insights.

Make sure to double-check your AndroidManifest.xml and ensure your development environment is properly set up and up-to-date. You can also check the namespace setup documentation for more details.

For any further assistance, our support team will be here to help you.

This response was generated by the Web3Auth Bot and someone from the Web3Auth team will be with you shortly to provide additional help.

Hey @gabriel.albarosa, can you please share the SDK version you are using and stack trace. The error you shared, doesn’t help much in debug and it looks like it’s not because of Web3Auth.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.