Android internet resolution not working

I am trying to set up a facebook connection with my program. I worked on this before, but I switched to a new computer and now for some reason permission is not granted. Whenever I click the facebok connect button, I get an error message saying “Application requires permission to access the Internet”. My manifest file is below. Does anyone see something wrong?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myname.appname" android:versionCode="1"
android:versionName="1.0">

<supports-screens android:smallScreens="false"
    android:normalScreens="true" android:largeScreens="false"
    android:anyDensity="false" />
<application android:icon="@drawable/icon" android:label="@string/app_name">

    <activity android:name=".LoginPage"
        android:screenOrientation="portrait" android:label="@string/login_tag">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <uses-permission android:name="android.permission.INTERNET">
    </uses-permission>
    <activity android:name=".mainDisplay" android:label="@string/app_name"></activity>

</application>

+3
source share
2 answers

Your item <uses-permission>must be outside the item <application>.

+4
source

When adding permission, he should add the following:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.Jouzer_Android"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

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

    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name" >

    />

</manifest>
+2
source

Source: https://habr.com/ru/post/1791885/


All Articles