mercredi 7 janvier 2015

Android openOrCreateDatabase failed to change locale for db to en_US

I'm opening an SQLite database in Android using openOrCreateDatabase. The method works fine on Nexus 10 with KitKat (and several other tablets) but fails on Nexus 9 with Lollipop with an error "failed to change locale for db xyz to en_US". This only happens if I try to open database in a public directory like Downloads. If I open using private context.getDatabasePath location, it works on Nexus 9. On all the other tablets both locations work. The reason I try to open in a public location is to be able to examine database with DDMS file explorer. Is there a way to create a database in the public location on Nexus 9? Thanks.


Aucun commentaire:

Enregistrer un commentaire