0

I just build my apk to test it on the phone but I got some weird errors like

  1. the dialogue box that opened on the onTap method stopped working but before or in the debug mode it is still working.
  2. the image picker has the same problem that it is not working in apk but it is working when running through android studio.

does anyone know any reason behind this is why this is happening?

it would be really helpful if you could help.

palak
  • 381
  • 7
  • 20
  • 2
    can you share some code, please? – Lars Jan 15 '21 at 10:33
  • have you tried doing a full-restart (by killing the app process and runing the app again) instead of hot-restart? – mfkw1 Jan 15 '21 at 10:41
  • you may run this command in your terminal to test `flutter run --release`. – John Joe Jan 15 '21 at 10:52
  • i tried to kill and run but the output is the same. and there is no error in the code as it runs perfectly on the emulator or on a phone when connected. – palak Jan 15 '21 at 11:18

1 Answers1

0

For some design issue it may occure in release mode. Where in debug mode we get some warning and ignore that but in release mode without solving those design issue it won't run smoothly. try to find if there has any design issue like

'Incorrect use of ParentDataWidget.'

So solution is

Run you app in debug mode and check logs, I am sure you will find the problem there.

Mimu Saha Tishan
  • 2,402
  • 1
  • 21
  • 40