cj123195 / multi_image_picker_plus

Flutter plugin that allows you to display multi image picker on iOS and Android.
MIT License
3 stars 9 forks source link

Unable to Build with Target SDK 34 #10

Open creativebymonarch opened 1 month ago

creativebymonarch commented 1 month ago

Hi,

The problem is :

A problem occurred configuring project ':multi_image_picker_plus'.
> 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: ../multi_image_picker_plus-0.0.4/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

For Android Target SDK 34 (which Google requires to be updated by the end of August), the module doesn't have a namespace.

Here's an example if you need it: https://github.com/fluttercommunity/plus_plugins/blob/main/packages/android_intent_plus/android/build.gradle#L27

Thank you !

cj123195 commented 1 month ago

Fixed in v0.0.5.

creativebymonarch commented 1 month ago

Thank you for your changes.

As also mentioned during the build, Android requires the 'package' attribute to be removed from the Manifest like this :

From this :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.tianxin.multi_image_picker_plus">
</manifest>

To this :
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

But I'm not sure if this could impact other SDK versions.

cj123195 commented 1 month ago

I did not encounter such issues during my local testing build. I think your situation is just an isolated case. I am not good at Android development, so I cannot be sure if it will affect other versions of the SDK.