Search code examples
flutterdartnodejs-serverflutter-apk

API not hitting when building apk and run it on another device


I am working on the flutter project. I hosted my backend server and got the IP. When I use that I to run the project on debug mode it hitting the API but when I build the apk and run it on the other device It is not hitting the API. How can I resolve this issue?

Frontend: Flutter + Dart
Backend: NodeJS + MongoDB


Solution

  • Add this line in the android manifest file: <uses-permission android:name="android.permission.INTERNET"/> Credit: Godson