Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HelloWebView Sample: java.lang.SecurityException: Permission Denial

I am trying to get the HelloWebView Sample up and running (as is, with no cuustomizations) found at

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

I continue to get java.lang.SecurityException: Permission Denial despite all efforts. In my mind this has got to be some fundamental lack of understanding on my part (I am a newbie) or something perhaps local to my development environment (Windows XP).

I have included my main.xml, AndroidManifest.xml, and console output below.

Things tried so far:

  • 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

Any help would be greatly appreciated.

Thank you. Tim

my main xml is:

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

my manifest file is:

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

Actual console output:

 ------------------------------
[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
like image 414
wide-angle Avatar asked Jun 04 '10 12:06

wide-angle


1 Answers

You have two entries in your manifest file for your HelloWebView activity. Try removing the second.

like image 160
Corey Sunwold Avatar answered Oct 13 '22 04:10

Corey Sunwold