views:

136

answers:

1

Hey Folks,

Updated: I have now included the logcat file below. Looking at it it appears I am still having a permission problems (06-05 14:10:36.593) - I am guessing the same problem I am having with SDK 7

Well I was trying to get the HelloWebview example working with SDK 7 with no success (see HelloWebView Sample: java.lang.SecurityException: Permission Denial thread), so I decided just out of curiosity to back off to SDK3 to see if I could learn anything. I have been able to get all the "Layout" samples to work and decided to try something a little harder.

Unfortunately, I still cannot get the simple HelloWebView app to run. I no longer get a Permission Denial but now the app is getting killed.

Killed usually implies that there are not enough resources (memory etc.) for an application to run.... Any thoughts? Are there any other log files I can look at either on my computer or on the emulator?

The main.xml, manifest, and console output are below. Let me know if you need more information.

Thanks, Tim

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

mainfest file:

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

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".HelloWebView3"
              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=".HelloWebView3" android:label="@string/app_name"
 android:theme="@android:style/Theme.NoTitleBar">
    </activity> 

</application>

Console output:

[2010-06-05 08:43:37 - HelloWebView3] ------------------------------
[2010-06-05 08:43:37 - HelloWebView3] Android Launch!
[2010-06-05 08:43:37 - HelloWebView3] adb is running normally.
[2010-06-05 08:43:37 - HelloWebView3] Performing com.example.hellowebview3.HelloWebView3 activity launch
[2010-06-05 08:43:37 - HelloWebView3] Automatic Target Mode: launching new emulator with compatible AVD 'Android1.5'
[2010-06-05 08:43:37 - HelloWebView3] Launching a new emulator with Virtual Device 'Android1.5'
[2010-06-05 08:43:42 - HelloWebView3] New emulator found: emulator-5554
[2010-06-05 08:43:42 - HelloWebView3] Waiting for HOME ('android.process.acore') to be launched...
[2010-06-05 08:45:04 - HelloWebView3] HOME is up on device 'emulator-5554'
[2010-06-05 08:45:04 - HelloWebView3] Uploading HelloWebView3.apk onto device 'emulator-5554'
[2010-06-05 08:45:04 - HelloWebView3] Installing HelloWebView3.apk...
[2010-06-05 08:45:19 - HelloWebView3] Success!
[2010-06-05 08:45:19 - HelloWebView3] Starting activity com.example.hellowebview3.HelloWebView3 on device 
[2010-06-05 08:45:23 - HelloWebView3] ActivityManager: Starting: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} comp={com.example.hellowebview3/com.example.hellowebview3.HelloWebView3} }
[2010-06-05 08:45:23 - HelloWebView3] ActivityManager: [1]   Killed                  am start -n com....

logcat output:

06-05 14:10:33.963: DEBUG/AndroidRuntime(763): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
06-05 14:10:33.963: DEBUG/AndroidRuntime(763): CheckJNI is ON
06-05 14:10:34.232: INFO/jdwp(763): received file descriptor 20 from ADB
06-05 14:10:34.253: DEBUG/AndroidRuntime(763): --- registering native functions ---
06-05 14:10:35.013: DEBUG/AndroidRuntime(763): Shutting down VM
06-05 14:10:35.013: DEBUG/dalvikvm(763): DestroyJavaVM waiting for non-daemon threads to exit
06-05 14:10:35.022: DEBUG/dalvikvm(763): DestroyJavaVM shutting VM down
06-05 14:10:35.032: DEBUG/dalvikvm(763): HeapWorker thread shutting down
06-05 14:10:35.053: DEBUG/dalvikvm(763): HeapWorker thread has shut down
06-05 14:10:35.053: DEBUG/jdwp(763): JDWP shutting down net...
06-05 14:10:35.062: DEBUG/jdwp(763): +++ peer disconnected
06-05 14:10:35.062: INFO/dalvikvm(763): Debugger has detached; object registry had 2 entries
06-05 14:10:35.073: DEBUG/dalvikvm(763): VM cleaning up
06-05 14:10:35.102: WARN/dalvikvm(763): LinearAlloc 0x0 not freed: 0x410caa08 len=20
06-05 14:10:35.102: WARN/dalvikvm(763): LinearAlloc 0x0 not freed: 0x410caa20 len=340
06-05 14:10:35.112: WARN/dalvikvm(763): LinearAlloc 0x0 not freed: 0x410cab78 len=2244
06-05 14:10:35.112: DEBUG/dalvikvm(763): LinearAlloc 0x0 used 632420 of 4194304 (15%)
06-05 14:10:35.561: DEBUG/AndroidRuntime(772): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
06-05 14:10:35.561: DEBUG/AndroidRuntime(772): CheckJNI is ON
06-05 14:10:35.793: DEBUG/AndroidRuntime(772): --- registering native functions ---
06-05 14:10:35.803: INFO/jdwp(772): received file descriptor 20 from ADB
06-05 14:10:36.593: INFO/ActivityManager(579): Starting activity: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10000000 comp={com.example.hellowebview3/com.example.hellowebview3.HelloWebView3} }
06-05 14:10:36.593: WARN/ActivityManager(579): Permission Denial: starting Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10000000 comp={com.example.hellowebview3/com.example.hellowebview3.HelloWebView3} } from null (pid=-1, uid=-1) requires null
06-05 14:10:36.602: DEBUG/AndroidRuntime(772): Shutting down VM
06-05 14:10:36.613: WARN/dalvikvm(772): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
06-05 14:10:36.613: ERROR/AndroidRuntime(772): Uncaught handler: thread main exiting due to uncaught exception
06-05 14:10:36.623: ERROR/AndroidRuntime(772): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
06-05 14:10:36.633: ERROR/AndroidRuntime(772): java.lang.SecurityException: Permission Denial: starting Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} flags=0x10000000 comp={com.example.hellowebview3/com.example.hellowebview3.HelloWebView3} } from null (pid=-1, uid=-1) requires null
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at android.os.Parcel.readException(Parcel.java:1234)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at android.os.Parcel.readException(Parcel.java:1222)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1046)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at com.android.commands.am.Am.runStart(Am.java:199)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at com.android.commands.am.Am.run(Am.java:73)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at com.android.commands.am.Am.main(Am.java:51)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at com.android.internal.os.RuntimeInit.finishInit(Native Method)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:186)
06-05 14:10:36.633: ERROR/AndroidRuntime(772):     at dalvik.system.NativeStart.main(Native Method)
06-05 14:10:36.661: ERROR/JavaBinder(772): Unknown binder error code. 0xfffffff7
06-05 14:10:36.661: ERROR/AndroidRuntime(772): Crash logging skipped, no checkin service
06-05 14:10:36.673: INFO/Process(772): Sending signal. PID: 772 SIG: 9
06-05 14:21:41.081: DEBUG/dalvikvm(626): GC freed 9840 objects / 555600 bytes in 106ms
A: 

There are any error messages you can look to. If you're using eclipse goto ddms perspective and open window logcat. (you can also directly display logcat without switching to the ddms perspective)

Roflcoptr
Cool...I will take a look. Thank you.
wide-angle