How to solve 'Black Screen on open' of Flutter release APKs
I've been tinkering with flutter recently and I encountered what was, to me, a somewhat frustrating issue. The app would work just fine in debug mode, both on physical and virtual devices. As soon as I'd build an apk with
flutter build apk --release
and move it to my Android device, the app would be 'stuck' on a black screen. Logs weren't useful and no apparent issue was found in debug mode.
The problem was a rather simple one to solve, the app didn't have access to the internet, which was needed in the first page already!
Simply adding <uses-permission android:name="android.permission.INTERNET" />
to the AndroidManifest.xml solved my issue immediately.
Happy tinkering!