开发者

android internet permission not working

开发者 https://www.devze.com 2023-02-10 11:04 出处:网络
I\'m trying to set-up facebook connect with my program. I had it working before, but I\'ve switched to a new computer and now for some reason permission isn\'t being granted. Whenever I hit my facebok

I'm trying to set-up facebook connect with my program. I had it working before, but I've switched to a new computer and now for some reason permission isn't being granted. Whenever I hit my facebok connect button, an error pops up, "Application requires permission to access the internet". My manifest file is below. Anyone see anything 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_n开发者_JAVA技巧ame"></activity>

</application>


Your <uses-permission> element needs to be outside of the <application> element.


While adding permission ,it must add like this:

<?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>
0

精彩评论

暂无评论...
验证码 换一张
取 消