Home > Back-end >  Android applications can run on the simulator, but phone flash back, debugging found a mistake, but
Android applications can run on the simulator, but phone flash back, debugging found a mistake, but

Time:09-23

The cause of the error:
E/le. Mylajifenle: [qarth_debug:] get PatchStore: : createDisableExceptionQarthFile method fail.
E/AndroidRuntime: FATAL EXCEPTION: the main
Process: com. Example. Mylajifenlei, PID: 22927
Java. Lang. RuntimeException: Unable to start the activity ComponentInfo {com. Example. Mylajifenlei/com. Example. Mylajifenlei. Game} : Java. Lang. NullPointerException: Attempt to invoke virtual method 'android. Database. Cursor android. The database, sqlite. SQLiteDatabase. RawQuery (Java. Lang. String, Java. Lang. String [])' on a null object reference
. An android app. ActivityThread. PerformLaunchActivity (ActivityThread. Java: 3430)
. An android app. ActivityThread. HandleLaunchActivity (ActivityThread. Java: 3614)
An android. App. Servertransaction. LaunchActivityItem. Execute (LaunchActivityItem. Java: 86)
An android. App. Servertransaction. TransactionExecutor. ExecuteCallbacks (TransactionExecutor. Java: 108)
An android. App. Servertransaction. TransactionExecutor. Execute (TransactionExecutor. Java: 68)
An android. App. ActivityThread $H.h andleMessage (ActivityThread. Java: 2199)
An android. OS. Handler. DispatchMessage (Handler. Java: 112)
. An android OS. Stars. Loop (216). Which Java:
. An android app. ActivityThread. Main (7625) ActivityThread. Java:
The at Java. Lang. Reflect. Method. Invoke (Native Method)
At com. Android. Internal. OS. RuntimeInit $MethodAndArgsCaller. Run (524) RuntimeInit. Java:
At com. Android. Internal. OS. ZygoteInit. Main (ZygoteInit. Java: 987)
Under Caused by: Java. Lang. NullPointerException: Attempt to invoke virtual method 'android. Database. Cursor android. The database, sqlite. SQLiteDatabase. RawQuery (Java. Lang. String, Java. Lang. String [])' on a null object reference
At com. Example. Mylajifenlei. DataHelper. GetQuestion (DataHelper. Java: 66)
At com. Example. Mylajifenlei. Game. OnCreate (Game. Java: 36)
. An android app. Activity. PerformCreate (7458) Activity. Java:
. An android app. Activity. PerformCreate (7448) Activity. Java:
. An android app. Instrumentation. CallActivityOnCreate (1286) Instrumentation. Java:
. An android app. ActivityThread. PerformLaunchActivity (ActivityThread. Java: 3409)
. An android app. ActivityThread. HandleLaunchActivity (ActivityThread. Java: 3614)
An android. App. Servertransaction. LaunchActivityItem. Execute (LaunchActivityItem. Java: 86)
An android. App. Servertransaction. TransactionExecutor. ExecuteCallbacks (TransactionExecutor. Java: 108)
An android. App. Servertransaction. TransactionExecutor. Execute (TransactionExecutor. Java: 68)
An android. App. ActivityThread $H.h andleMessage (ActivityThread. Java: 2199)
An android. OS. Handler. DispatchMessage (Handler. Java: 112)
. An android OS. Stars. Loop (216). Which Java:
. An android app. ActivityThread. Main (7625) ActivityThread. Java:
The at Java. Lang. Reflect. Method. Invoke (Native Method)
At com. Android. Internal. OS. RuntimeInit $MethodAndArgsCaller. Run (524) RuntimeInit. Java:
At com. Android. Internal. OS. ZygoteInit. Main (ZygoteInit. Java: 987)

Lead to wrong statement here:
Cursor Cursor=db. RawQuery (" select * from question ", null);
Whether rawQuery () method have what problem

CodePudding user response:

Code here, display an error is cursor=the rawQuery (" select * from question ", null); And list=db. GetQuestion (); I really don't know how to change, please leaders to help

  • Related