0

Debug apk works fine, release apk not working..

Tried flutter build apk --no-sound-null-safety it builds release apk but does not works.

Nikhil Patil
  • 11
  • 3
  • 8
  • Please include some code or a description of the sample code and device you are resting on. This doesn't include enough details for anyone to be able to help. – rmtmckenzie Mar 18 '21 at 07:24
  • The code is working totallly fine without any errors. When I am testing debug apk on any real device it also works fine but when I build the release apk the apk get's installed but does not move respond after entering Login details.. – Nikhil Patil Mar 18 '21 at 08:00
  • Please include at least the log, or some error it might occour. Otherwise it is difficult to understand. – L. Gangemi Mar 18 '21 at 10:50

3 Answers3

0

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

Nikhil Patil
  • 11
  • 3
  • 8
0

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

Solution enter image description here

enter image description here

enter image description here

Code for building APK: flutter build apk --no-sound-null-safety

DL Studio
  • 267
  • 3
  • 7
0

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
AzeTech
  • 623
  • 11
  • 21