Home > Mobile >  Android USES LitePal error NullPointException how to solve?
Android USES LitePal error NullPointException how to solve?

Time:09-27

Error corresponding code for: LitePal getDatabase ();
E/AndroidRuntime: FATAL EXCEPTION: the main
Process: com. Xyxl. Testproject, PID: 12899
Java. Lang. NullPointerException
The at Java. Lang. Class. ClassForName (Native Method)
The at Java. Lang. Class.forname (453) Class. Java:
The at Java. Lang. Class.forname (378) Class. Java:
The at org. Litepal. LitePalBase. GetSupportedFields (LitePalBase. Java: 194)
The at org. Litepal. LitePalBase. GetTableModel (LitePalBase. Java: 123)
The at org. Litepal. Tablemanager. Generator. GetAllTableModels (74). The Generator Java:
The at org. Litepal. Tablemanager. Creator. CreateOrUpgradeTable (Creator. Java: 48)
The at org. Litepal. Tablemanager. The Generator. The create (171). The Generator Java:
The at org. Litepal. Tablemanager. The Generator. The create (209). The Generator Java:
The at org. Litepal. Tablemanager. LitePalOpenHelper. OnCreate (LitePalOpenHelper. Java: 85)
An android. Database. Sqlite. SQLiteOpenHelper. GetDatabaseLocked (SQLiteOpenHelper. Java: 310)
An android. Database. Sqlite. SQLiteOpenHelper. GetWritableDatabase (SQLiteOpenHelper. Java: 206)
The at org. Litepal. Tablemanager. Connector. GetWritableDatabase (Java: the 63)
The at org. Litepal. Tablemanager. Connector. GetDatabase (Java: the 75)
At org. Litepal. Operator. The.findall (1116) Operator. Java:
At org. Litepal. Operator. The.findall (1082) Operator. Java:
The at org. Litepal. Litepal. The.findall (litepal. Java: 798)
At com. Xyxl. Testproject. Fragments could. MailListFragment. InitData (MailListFragment. Java: 161)
At com. Xyxl. Testproject. Fragments could. MailListFragment. OnCreateView (MailListFragment. Java: 84)
The at androidx. Fragments. App. Fragments. PerformCreateView (fragments. Java: 2442)
The at androidx. Fragments. App. FragmentManagerImpl. MoveToState (FragmentManager. Java: 1460)
The at androidx. Fragments. App. FragmentManagerImpl. MoveFragmentToExpectedState (FragmentManager. Java: 1784)
The at androidx. Fragments. App. FragmentManagerImpl. MoveToState (FragmentManager. Java: 1852)
The at androidx. Fragments. App. BackStackRecord. ExecuteOps (BackStackRecord. Java: 802)
The at androidx. Fragments. App. FragmentManagerImpl. ExecuteOps (FragmentManager. Java: 2625)
The at androidx. Fragments. App. FragmentManagerImpl. ExecuteOpsTogether (FragmentManager. Java: 2411)
The at androidx. Fragments. App. FragmentManagerImpl. RemoveRedundantOperationsAndExecute (FragmentManager. Java: 2366)
The at androidx. Fragments. App. FragmentManagerImpl. ExecPendingActions (FragmentManager. Java: 2273)
The at androidx. Fragments. App. FragmentManagerImpl $1. Run (FragmentManager. Java: 733)
An android. OS. Handler. HandleCallback (Handler. Java: 808)
An android. OS. Handler. DispatchMessage (Handler. Java: 101)
. An android OS. Stars. Loop (166). Which Java:
. An android app. ActivityThread. Main (7529) ActivityThread. Java:
The at Java. Lang. Reflect. Method. Invoke (Native Method)
At com. Android. Internal. OS. Zygote $MethodAndArgsCaller. Run (Zygote. Java: 245)
At com. Android. Internal. OS. ZygoteInit. Main (ZygoteInit. Java: 921)

CodePudding user response:

LitePal do not maintain for a long time, change the objectbox or realm
  • Related