storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 715 forks source link

Android 12 targetSdkversion 30 shows java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String io.liteglue.SQLDatabaseHandle.getLastErrorMessage()' on a null object reference #995

Open nadirabanu opened 2 years ago

nadirabanu commented 2 years ago

we have updated Android sdkversions as below and have an issue when we run it on android 12. Any help is appreciated. defaultTargetSdkVersion= 30 defaultCompileSdkVersion=30

java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String io.liteglue.SQLDatabaseHandle.getLastErrorMessage()' on a null object reference at io.liteglue.SQLiteGlueConnection.(SQLiteGlueConnection.java:12)

bilalsaeed commented 2 years ago

Hi @nadirabanu

did you manage to resolve it?

nadirabanu commented 2 years ago

yes @bilalsaeed I followed the recommendation given below and mentioned in the link provided below. Now it works fine on all devices.

The this.oldImpl = true is the same result of using the mentioned workaround androidDatabaseProvider: 'system'.

https://github.com/OutSystems/Cordova-sqlite-storage/pull/7

bilalsaeed commented 2 years ago

I upgraded the plugin on latest and it worked.