MAHAulia / device_imei

Flutter plugins to get real IMEI for Mobile Device
MIT License
4 stars 5 forks source link

Add namespace to support AGP8+ #6

Open famasf1 opened 5 months ago

famasf1 commented 5 months ago

When i tried to build my app using Android Gradle Plugin 8+. I got this error,

Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.

Recommendation: remove package="com.vai.device_imei" from the source AndroidManifest.xml: {project path}\android\src\main\AndroidManifest.xml.

This is because Android Gradle Plugin 8.0+ required namespace in Module-level script. So i removed the package from AndroidManifest.xml and added the new namespace into the build.gradle instead.

I also removed package attributes in AndroidManifest to prevent

Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. 

error during build phase. Feel free to edit your own namespaces before updating your package in pub.dev.

Tested on my app using OPPO Reno 5 Pro (API 33) and Android API 34 emulator.