cleveradssolutions / CAS-Unity

CAS.AI Unity plugin for monetizing mobile applications.
https://cas.ai
Apache License 2.0
24 stars 4 forks source link

Issues Building in Unity 6000.0.1f1 #6

Closed AndrewKahr closed 5 months ago

AndrewKahr commented 6 months ago

The plugin cannot build for Android after updating to Unity 6000.0.1f1 as it has upgraded to gradle plugin version 8.3.0 which removed android.enableDexingArtifactTransform=false and replaced it with android.useFullClasspathForDexingTransform=true. Even after making this change the build will fail stating that a namespace needs to be defined for the CASPlugin.androidlib. It seems the library is defining the namespace in the AndroidManifest.xml which is no longer supported in 8.3.0 and instead needs to be defined in the library's build.gradle. This was done on a fresh project in 6000.0.1f1 after following the setup instructions in the wiki.

Str4tos commented 6 months ago

Hi @AndrewKahr, thank you for raising the issue.

We will work on compatibility of our plugin for Unity 6 and notify you as soon as possible.

Starksky commented 6 months ago

Hi, the same mistake image

What went wrong: A problem occurred configuring project ':unityLibrary:CASPlugin.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.

Str4tos commented 5 months ago

Hello @AndrewKahr @Starksky, we have released CAS 3.8.0 in which the CASPlugin.androidlib and enableDexingArtifactTransform has been removed.
Please check the project builds with the new CAS version and Unity 6.

AndrewKahr commented 5 months ago

The fix appears to be working. Thanks so much for the fix!