Why can’t a Flutter application connect to the Internet when installing “app-release.apk”? But it works normally in debug mode

Open the AndroidManifest.xml file located at ./android/app/src/main and add the following line:

<manifest xmlns:android="...">
  <uses-permission android:name="android.permission.INTERNET"/> <!-- Add this -->
</manifest>

From here:

Add the android.permission.INTERNET permission if your application code needs Internet access. The standard template does not include this tag but allows Internet access during development to enable communication between Flutter tools and a running app.

Leave a Comment