问题
I want to open a database and read some values from asset or resource folder.I don't want to write any data to DB.since my db size is huge I cant copy it to database folder as it will consume lot of time and memory. Any help?
回答1:
Sorry, but this is not possible. SQLite cannot work with purely an InputStream, which is all you can get from an asset or raw resource. Remember that assets and resources are not files on the device — they are only files on your development machine.
来源:https://stackoverflow.com/questions/36060140/can-i-open-a-read-alone-database-from-res-asset-folder-in-android-without-copyin