DEV Community

Cover image for Learnt it the hard way
Visakh Vijayan
Visakh Vijayan

Posted on • Updated on

Learnt it the hard way

So am on this quest to learn how to use graphql with flutter. And even the library says it's pretty straight forward to implement it, I ran into a strange issue recently.

Problem

The strange thing is that while using the debug apk, graphql works nicely. Once I make a build it stops working.

After a lot of time spent :'( I saw that the APIs are not being hit. Thank you Heroku for the application logs. A

Solution

Apparently you have to add the INTERNET permission in the AndroidManifest.xml file under app/src/main. So if anyone is facing the same issue just add this line in the file

<uses-permission android:name="android.permission.INTERNET"/>
Enter fullscreen mode Exit fullscreen mode

P.S. It's strange REST never threw this error.

Strange.

Top comments (3)

Collapse
 
itsjzt profile image
Saurabh Sharma

this it so common issue with android stuff. Especially when learning it

Collapse
 
vjnvisakh profile image
Visakh Vijayan

True ... I was wondering why this didn't come up while using REST

Collapse
 
itsjzt profile image
Saurabh Sharma

It comes in REST too unless you have already asked for the permission