Debug apk works fine, release apk not working..
Tried flutter build apk --no-sound-null-safety it builds release apk but does not works.
Debug apk works fine, release apk not working..
Tried flutter build apk --no-sound-null-safety it builds release apk but does not works.
Issue Solved!!
Actually, the problem was with 'http' as SSL certificate was not included for the admin panel hence, app showed
Bad state: Insecure HTTP is not allowed by platform
error in some devices while it was running in my Mi note4 mobile phone.
Added
android:usesCleartextTraffic="true"
line in
AndroidManifest.xml
file inside
<manifest <application android:usesCleartextTraffic="true""> </application> </manifest>
tag
The ability to mix language versions frees package maintainers to migrate their code, with the knowledge that even legacy users can get new bug fixes and other improvements. However, mixed-version programs don’t get all the advantages that null safety can bring. Read here
Code for building APK:
flutter build apk --no-sound-null-safety
Edit Configuration -> Addition run arguments
--no-sound-null-safety
In main.dart file,
// @dart=2.9
Try
flutter build apk --release --no-sound-null-safety