skip to Main Content

The Flutter app I’m currently building works perfectly in debugging mode on the emulator, but when i create an apk and install it on my real phone it doesn’t work as intended.

I think it might has to do something with permissions because in my app i download some json from the internet. I can’t find a solution though that works.

2

Answers


  1. Chosen as BEST ANSWER

    I added this line of code <uses-permission android:name="android.permission.INTERNET" />
    just below the manifest opening tag to add Internet persmissions


  2. Since you are getting data from server, you need to add internet permission so your app will be able to connect to the internet.
    simply adding

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

    on

    android/app/src/main/AndroidManifast.xml 
    

    Add this line, it will Fix your problem.

    For example:

    <manifest 
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.movie_app">
    <uses-permission android:name="android.permission.INTERNET"/>  //Add this line here
    <application
        android:label="movie_app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
    

    Happy Coding 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search