react-native-sqlite-storage
                                
                                 react-native-sqlite-storage copied to clipboard
                                
                                    react-native-sqlite-storage copied to clipboard
                            
                            
                            
                        Error: Could not open database
Hello, I would like to generate sqlite file in the specified directory, the first run, sqlite file does not exist, you need to create automatically. I have tried many ways.
- 
Option One: Error: Could not open database. SQLiteStorage.openDatabase({name: '/mnt/shared/test/testSqlite.db'},()=>{this._successCB('open');},(err)=>{this._errorCB('open',err);});DEBUG Message 
- 
Option Two: can not continue to run, stay here. SQLiteStorage.openDatabase({name: "testSqlite.db",createFromLocation: "/mnt/shared/test/testSqlite.db"},()=>{this._successCB('open');},(err)=>{this._errorCB('open',err);});DEBUG Message 
Please help to solve, thank you very much!
Were you able to solve it? Did your db already exist before you tried opening it?
Any updates on this issue?
You cannot open ANY database location. See the documentation on openDatabase and see what is supported. You have to bundle your pre-populated database in the app asset. Also, have a look at the output of the debug console in your IDE...it will print more details debugging information as the application runs from it...
@andpor what's the rationale behind disallowing to open databases from any location?
I follow the below blog to integrate SQLite storage
for SQLite DB in android, we have to put on the assets folder.
https://medium.com/infinitbility/react-native-sqlite-storage-422503634dd2
I finally managed to solve it, it was because of the use of "SQLite bundled with this library", just enough that of the react-native.config.js file

Just remove it and work for me in android.