当我尝试在设备上运行我的应用程序时,我收到以下错误:权限被拒绝(缺少INTERNET权限?).我在AndroidManifest.xml中拥有互联网权限.这是AndroidManifest文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jamp.vsite.hr.weathervak" >
<uses-permission android:name="android.name.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Run Code Online (Sandbox Code Playgroud)
这是我的logcat
11-19 16:08:12.610 862-862/jamp.vsite.hr.weathervak E/Trace? error opening trace file: No such file or directory (2)
11-19 16:08:12.650 862-862/jamp.vsite.hr.weathervak W/ActivityThread? Application jamp.vsite.hr.weathervak can be debugged on port 8100...
11-19 16:08:13.300 862-886/jamp.vsite.hr.weathervak D/libc? [NET] getaddrinfo hn 22, servname NULL, ai_family 0+
11-19 16:08:13.310 862-886/jamp.vsite.hr.weathervak W/dalvikvm? threadid=11: thread exiting with uncaught …Run Code Online (Sandbox Code Playgroud)