0

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.

1

3 Answers 3

3

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" />
Sign up to request clarification or add additional context in comments.

3 Comments

I already tried it yet no success
Are you sure ? you can try by self make app running in release mode by flutter clean and build again
This just saved me after 24 hours 😂
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
    }
}

Comments

0

Makes sure you set the state of the data you want to display using setState((){}) or any state management tool you are using

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.