Hi, I’m new in React Native and I wanna connect a pre populated SQLite database with my project and make a insert with a register form, when I run my app in the Android Emulator appears that in the following image happens, my app can’t find my db file (ProjectDB.db (I can’t publicate the actual name)). (The error in Android Studio and the file locations):
Other solutions on Internet haven’t worked for me and I don’t understand what I’m doing wrong
// import * as FileSystem from 'expo-file-system';
// import {openDatabase} from 'react-native-sqlite-storage';
//import { SQLite } from 'expo';
import * as SQLite from 'expo-sqlite';
//Database conexion
const db = SQLite.openDatabase({name: ProjectDB.db, createFromLocation: 1});
HERE I call my db like just as a tutorial would suggest to me
I tried to do something with Asset, FileSystem and Async and it didn’t work for me.
And f I use openDatabase from “react-native-sqlite-storage” the following error appears:
“null is not an object (evaluating 'NativeModules[“SQLite”][method])”
Please, help me, I don’t understand what I may need in my code.