[android-developers] Re: stand-alone notepad content provider insert error

2008-04-02 Thread logisic

i appreciate your reply. i did what you suggested but somehow i'm
still getting the same error. any other ideas?

On Mar 31, 11:23 pm, haitian [EMAIL PROTECTED] wrote:
 Maybe you database is collision or error. you can try to wipe all the
 emulator data.

 In DOS command, change the current path to \Your_Android_SDK_Path\tools
 \

 run emulator -wipe-data to wipe all the emulator data.

 On 3月26日, 下午6时00分, logisic [EMAIL PROTECTED] wrote:

  played around with the original notepad example. split the code into 2
  apps as follows: app NotePad(com.google.android.notepad) contains
  NoteEditor.java, NotesList.java and TitleEditor.java. app
  NoteProvider(com.google.provider) contains NotePad.java and
  NotePadProvider.java.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] stand-alone notepad content provider insert error

2008-03-26 Thread logisic

played around with the original notepad example. split the code into 2
apps as follows: app NotePad(com.google.android.notepad) contains
NoteEditor.java, NotesList.java and TitleEditor.java. app
NoteProvider(com.google.provider) contains NotePad.java and
NotePadProvider.java.

installed the NoteProvider using adb, then launched NotePad from
eclipse. got to the main screen(empty notes list) fine but when Add
note is pressed, i get an error Unable to start activity
ComponentInfo {com.google.android.notepad/
com.google.android.notepad.NoteEditor}:
java.lang.NullPointerException.

what am i missing here, pls help. here is the logcat just in case:
I/ActivityManager(  517): Starting activity: Intent
{ action=android.intent.action.INSERT data=content://
com.google.provider.NotePad/notes comp={com.google.android.notepad/
com.google.android.notepad.NoteEditor} }
D/ActivityThread(  633): Performing launch of ActivityRecord{40047b00
[EMAIL PROTECTED] {com.google.android.notepad/
com.google.android.notepad.NoteEditor}}
D/dalvikvm(  633): Exception Ljava/lang/RuntimeException; from
ActivityThread.java:1758 not caught locally
D/dalvikvm(  633): Exception Ljava/lang/RuntimeException; from
ZygoteInit.java:1553 not caught locally
D/AndroidRuntime(  633): Shutting down VM
W/dalvikvm(  633): threadid=3: thread exiting with uncaught exception
(group=0x4000fdf8)
E/AndroidRuntime(  633): Uncaught handler: thread Main exiting due to
uncaught exception
E/AndroidRuntime(  633): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.google.android.notepad/
com.google.android.notepad.NoteEditor}: java.lang.NullPointerException
E/AndroidRuntime(  633):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1758)
E/AndroidRuntime(  633):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1770)
E/AndroidRuntime(  633):at android.app.ActivityThread.access
$1500(ActivityThread.java:99)
E/AndroidRuntime(  633):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1271)
E/AndroidRuntime(  633):at
android.os.Handler.dispatchMessage(Handler.java:80)
E/AndroidRuntime(  633):at android.os.Looper.loop(Looper.java:
91)
E/AndroidRuntime(  633):at
android.app.ActivityThread.main(ActivityThread.java:3052)
E/AndroidRuntime(  633):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  633):at
java.lang.reflect.Method.invoke(Method.java:356)
E/AndroidRuntime(  633):at android.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:1547)
E/AndroidRuntime(  633):at
android.os.ZygoteInit.main(ZygoteInit.java:1445)
E/AndroidRuntime(  633):at
android.dalvik.NativeStart.main(Native Method)
E/AndroidRuntime(  633): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  633):at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:
355)
E/AndroidRuntime(  633):at
android.content.ContentResolver.insert(ContentResolver.java:287)
E/AndroidRuntime(  633):at
com.google.android.notepad.NoteEditor.onCreate(NoteEditor.java:131)
E/AndroidRuntime(  633):at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
847)
E/AndroidRuntime(  633):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1728)
E/AndroidRuntime(  633):... 11 more
I/Process (  517): Sending signal. PID: 633 SIG: 3
I/dalvikvm(  633): threadid=7: reacting to signal 3
I/dalvikvm(  633): DALVIK THREADS:
I/dalvikvm(  633): Main prio=5 tid=3 NATIVE
I/dalvikvm(  633):   | group=main sCount=1 dsCount=0 s=0
obj=0x40010450
I/dalvikvm(  633):   | sysTid=496 nice=0 sched=0/0 handle=-1090773764
I/dalvikvm(  633):   at android.os.BinderProxy.transact(Native Method)
I/dalvikvm(  633):   at
android.app.ActivityManagerProxy.handleApplicationError(ActivityManagerNative.java:
1441)
I/dalvikvm(  633):   at android.os.RuntimeInit.crash(RuntimeInit.java:
250)
I/dalvikvm(  633):   at android.os.RuntimeInit
$UncaughtHandler.uncaughtException(RuntimeInit.java:56)
I/dalvikvm(  633):   at
java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:853)
I/dalvikvm(  633):   at
java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:850)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):   at android.dalvik.NativeStart.main(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): Binder Thread #2 prio=5 tid=13 NATIVE
I/dalvikvm(  633):   | group=main sCount=1 dsCount=0 s=0
obj=0x4006e0b8
I/dalvikvm(  633):   | sysTid=647 nice=-10 sched=0/0 handle=1314440
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): Binder Thread #1 prio=5 tid=11 NATIVE
I/dalvikvm(  633):   | group=main sCount=1 dsCount=0 s=0
obj=0x4005b688
I/dalvikvm(  633):   | sysTid=646 nice=-10 sched=0/0 handle=1311160
I/dalvikvm(  633):   at