English 中文(简体)
HelloWebView Sample: java.lang. SecurityException: Permission Denial
原标题:HelloWebView Sample: java.lang.SecurityException: Permission Denial

我正试图接手HelloWebView Sample(如没有 cu子)在座。

rel=“nofollow noreferer”http://developer.android.com/resources/tutorials/views/hello-webview.html

我继续 j。 安全 例外:尽管做出了各种努力,但还是允许拒绝。 我认为,这必然是我根本缺乏理解(我是一个新鲜事物),或许是我发展环境的地方(Windows XP)。

我的主编为:乐施会、乐施会、乐施会。

迄今审理的案件:

  • different api s (6,7)
  • adding/verifying (I think :)) that "uses-permission android:name="android.permission.INTERNET"" has the correct syntax and location in my manifest.
  • wiping emulator
  • restarting eclipse, laptop etc.
  • disabling my internet security

任何帮助都将受到高度赞赏。

Thank you. Tim

我的主轴是:

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

我的明确档案是:

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

实际青s产出:

 ------------------------------
[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
[2010-06-04 07:57:06 - HelloWebView] Automatic Target Mode: launching new emulator with compatible AVD  AndroidGM2.1 
[2010-06-04 07:57:06 - HelloWebView] Launching a new emulator with Virtual Device  AndroidGM2.1 
[2010-06-04 07:57:08 - HelloWebView] New emulator found: emulator-5554
[2010-06-04 07:57:08 - HelloWebView] Waiting for HOME ( android.process.acore ) to be launched...
[2010-06-04 07:57:34 - HelloWebView] WARNING: Application does not specify an API level requirement!
[2010-06-04 07:57:34 - HelloWebView] Device API version is 7 (Android 2.1)
[2010-06-04 07:57:34 - HelloWebView] HOME is up on device  emulator-5554 
[2010-06-04 07:57:34 - HelloWebView] Uploading HelloWebView.apk onto device  emulator-5554 
[2010-06-04 07:57:35 - HelloWebView] Installing HelloWebView.apk...
[2010-06-04 07:57:46 - HelloWebView] Success!
[2010-06-04 07:57:47 - HelloWebView] Starting activity com.example.hellowebview.HelloWebView on device 
[2010-06-04 07:57:55 - HelloWebView] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.hellowebview/.HelloWebView }
[2010-06-04 07:57:55 - HelloWebView] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.hellowebview/.HelloWebView } from null (pid=-1, uid=-1) requires null
问题回答

您的HelloWebView活动清单中有两个条目。 删除第二段。

然而,这种例外情况与APICS版本有关,例如I Anders 1.5,因此,我添加到我的AndrewManifest。

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

2. 核对你的电文......

[2010-06-04 07:57:34 - HelloWebView] WARNING: Application does not specify an API level requirement! 
[2010-06-04 07:57:34 - HelloWebView] Device API version is 7 (Android 2.1)

www.un.org/Depts/DGACM/index_spanish.htm 我认识到,问题是,你在Manifest.xml上确定了两项活动(HelloWebView),你必须删除其中一项。

  <activity android:name=".HelloWebView"




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签