小编wid*_*gle的帖子

HelloWebView示例:java.lang.SecurityException:Permission Denial

我正在尝试启动和运行HelloWebView示例(因为没有自定义)

http://developer.android.com/resources/tutorials/views/hello-webview.html

我继续得到java.lang.SecurityException:Permission Denial尽管付出了很多努力.在我看来,我必须对我的一些基本缺乏理解(我是新手)或者我的开发环境(Windows XP)可能是本地的.

我在下面包含了我的main.xml,AndroidManifest.xml和控制台输出.

迄今为止尝试的事情:

  • 不同的api(6,7)
  • 添加/验证(我认为:))"uses-permission android:name ="android.permission.INTERNET""在我的清单中具有正确的语法和位置.
  • 擦拭模拟器
  • 重启日食,笔记本电脑等
  • 禁用我的互联网安全

任何帮助将不胜感激.

谢谢.蒂姆

我的主要xml是:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<WebView
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>
</LinearLayout> 
Run Code Online (Sandbox Code Playgroud)

我的清单文件是:

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

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".HelloWebView"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".HelloWebView" android:label="@string/app_name"
 android:theme="@android:style/Theme.NoTitleBar">
    </activity> 

</application>
Run Code Online (Sandbox Code Playgroud)

实际控制台输出:

 ------------------------------
[2010-06-04 07:57:06 - HelloWebView] Android Launch!
[2010-06-04 07:57:06 - HelloWebView] adb is running normally.
[2010-06-04 07:57:06 - HelloWebView] Performing com.example.hellowebview.HelloWebView activity launch …

permissions android

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

android ×1

permissions ×1