-1

My API GET request gives me List of images and text which is displayed in debug mode emulator and real device too with data cable but when I build apk and install it I do not get the data. Also my app is already in play store and this is new feature I am working on. Anyone could help me with that? I am using path_provider and path packages too.

  • Add network permission in AndroidManifest.xml https://stackoverflow.com/questions/55603979/why-cant-a-flutter-application-connect-to-the-internet-when-installing-app-rel – Shashi kumar S Jul 07 '22 at 09:58

2 Answers2

2

You have to provide internet permission inside android manifest file as right now you have in debug mode.

Mainfest file path : <project>/android/app/src/main/AndroidManifest.xml

enter image description here

   <uses-permission android:name="android.permission.INTERNET" />
Hardik Mehta
  • 2,195
  • 1
  • 11
  • 14
0

Method (1). If your app requires internet permission, you need to make sure that it's specified. If not given it will still work on debug mode and not on release mode.

Android > App > Src > Main > AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"/>

Method (2). Aadding shrinkResources false and minifyEnabled false in the android/app/build.gradle file under buildTypes

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        shrinkResources false
        minifyEnabled false
        signingConfig signingConfigs.debug
    }
}
Mohammad Faizan
  • 191
  • 1
  • 4