1

When I create localDB using nativescript-sqlite plugin it is throwing following error.

SQLITE.CONSTRUCTOR - Open DB Error Error: java.lang.Exception: Failed resolving method open OrCreateDatabase on class android.database.sqlite.SQLiteDatabase

Why it is showing this error

Mr.Pandya
  • 1,899
  • 1
  • 13
  • 24
  • post any code related to the error above and follow the best practice when posting a question in SO - https://stackoverflow.com/help/how-to-ask – Nick Iliev Feb 13 '18 at 12:49

1 Answers1

2

I know it's a few months later but maybe it will help to someone else. I was struggling with same issue for about few hours. In my case root cause was a minor update of nativescript-sqlite dependency from 1.1.7 to a newer one (minor) 1.1.11. Dependency declaration looked like below: "dependencies": { "nativescript-sqlite": "~1.1.7", }, and putting exact version as dependency solved the issue: "dependencies": { "nativescript-sqlite": "1.1.7", }, Of course please reinstall dependencies after patching code. Hope it will save someone time. It's a work-around and probably at the end you'll have to refactor code and update to version 2.x.

HakerMSL
  • 91
  • 9