Solution :
Please be very sure that the place where you adding
<uses-permission android:name="android.permission.INTERNET"/>
is correct.
You should write it like that in the AndroidManifest.xml :
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.project">
<uses-permission android:name="android.permission.INTERNET"/>
This will fix your issue.
OR
Well it is the very confusing kind of bug. There could be many reasons listed below:
- You are not mentioning a permission in right place. Like right above the application.
- You are not using the small letters.
- In some case you also have to add the Network state permission.
- One which was my case that there are some blank lines in the manifest lines. Like there might be the blank line between the permission tag and application line. You need to Remove them and you are done. Hope it will help you.
OR
I spent hours looking for the solution to this problem and none of a solution in a answers worked. Then I found out that I accidentally added the space during autocomplete between the android.permission.INTERNET
and "