“Namespace not specified” Gradle issue when building with SuperSonicWisdom SDK

I’m having trouble building for an Android device. I’m using Supersonic’s SDK with Unity 6 version (6000.0.29f1)

The error message is:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':unityLibrary:SupersonicWisdom.androidlib'.
> 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 https://d.android.com/r/tools/upgrade-assistant/set-namespace 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 3s


As a potential solution I tried creating new files in the Assets/Plugins/Android/* directory, and I also added namespace attribute to my build.gradle but the issue persists.
Help me if you have any solution.

Worth checking if there’s new Supersonic SDK version and updating.
If not - check AndroidManifest.xml located in the SupersonicWisdom.androidlib and add the namespace if it’s missing

1 Like

Thanks so much for the suggestion! I actually tried that already, but I wasn’t able to get it to work. I should mention that I recently downloaded the SDK, so it’s pretty new.:slightly_frowning_face:

I did a mistake in previous reply, instead of AndroidManifest xml there should be build.gradle, but specifically the one in .androidlib
Can you share the content of that?

Hey eliranmtl007, by any chance have you fixed the issue?

I am facing the same issue with Wisdom SDK but I am using Unity version 2022.3.40f1. The project is unable to build even when it is an empty project only with WisdomSDK.

Let me know if you have found anything useful.

Hey IGuscin,

I am facing the same issue and the build is not happening even with the empty project with only wisdomSDK. I am using 2022.3.40f1. Attaching the screenshot of the errors. Let me know please how to proceed to fix this.




In your case there’s issue that SDK license agreements were not accepted, it’s mentioned in the error log.
image
sdkmanager can be found under you Unity installation path:

\2022.3.44f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\6.0\bin\sdkmanager.bat

Thank you @IGuscin Your suggestion was on point and the I am now able to build the project now. I was on it for couple of days and but all the efforts were in vain. Appreciate your prompt response.