Dheeraj Yandrapu
Dheeraj Yandrapu

Reputation: 83

flutter build apk file not working on http requests?

I used the command flutter build apk --split-per-abi then the app size got reduced from 48Mb to 7.1Mb. But in this reduced apk, the HTTP requests are not working. I also built using flutter build apk, through this the app size reduced to 19Mb, In this also the requests are not working. So what to do to reduce the application size and make the app work perfectly.

Upvotes: 1

Views: 1644

Answers (2)

Emmanuel Owusu
Emmanuel Owusu

Reputation: 1

If doing the above but still not working. Try changing your endpoints url from "HTTP" to "HTTPS". example;

If it was " http://mylink.com/api" Change it to "https://mylink.com/api"

Upvotes: -1

Dheeraj Yandrapu
Dheeraj Yandrapu

Reputation: 83

As Testeur Maniak said to add the internet permission tag in the manifest.xml file, in the above comments. I tried by adding the line

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

Now it is working perfectly.

Upvotes: 3

Related Questions