pdftron-flutter icon indicating copy to clipboard operation
pdftron-flutter copied to clipboard

Configure Android namespace to fix missing namespace issue on Gradle >= 8.x

Open h3x4d3c1m4l opened this issue 1 year ago • 1 comments

Fixes:

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

Aside from this, one should add this to the gradle.properties of the application (adding it to the library did not fix the issue):

android.nonTransitiveRClass=false

h3x4d3c1m4l avatar Oct 17 '24 09:10 h3x4d3c1m4l

~Setting it to draft for now as I'm still investigating another build issue which seems related.~ fixed

h3x4d3c1m4l avatar Oct 17 '24 11:10 h3x4d3c1m4l

Anyone :) ?

h3x4d3c1m4l avatar Nov 18 '24 08:11 h3x4d3c1m4l

Why has this change not been merged yet?

eslamwael74 avatar Dec 05 '24 18:12 eslamwael74

Thank you for the PR! Hey Shirley @sgong-pdftron and Andrew @ama-pdftron, could you please take a look when you have a moment?

NoftScarlet avatar Dec 07 '24 19:12 NoftScarlet

Thanks for the PR but there appears to be some compilation issues in PluginUtils.java.

I will be closing this issue in favor for https://github.com/ApryseSDK/pdftron-flutter/pull/332 . The issue should be fixed in the latest version 1.0.1-38.

brandenfung2 avatar Dec 10 '24 08:12 brandenfung2