大佬教程收集整理的这篇文章主要介绍了android – SQLite – 无法打开数据库文件,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我的代码:
String applicationFolderPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),"CanFindLOCATIOn"); String databaseFilename = System.IO.Path.Combine(applicationFolderPath,"CanFindLOCATIOn.db"); sqlite.sqlite3.Config(sqlite.sqlite3.ConfigOption.serialized); var db = new sqliteConnection (databaseFileName);
这是我得到的错误:
sqlite.sqliteException: Could not open database file: /data/data/com.xamarin.docs.android.mapsandLOCATIOndemo2/files/CanFindLOCATIOn/CanFindLOCATIOn.db (CAnnotOpen)
我有相同的代码在另一个Xamarin应用程序中工作,并想知道该异常是否与包的名称有关?
提前致谢
尝试:
String applicationFolderPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),"CanFindLOCATIOn"); // Create the folder path. System.IO.Directory.CreateDirectory(applicationFolderPath); String databaseFilename = System.IO.Path.Combine(applicationFolderPath,"CanFindLOCATIOn.db"); sqlite.sqlite3.Config(sqlite.sqlite3.ConfigOption.serialized); var db = new sqliteConnection (databaseFileName);
以上是大佬教程为你收集整理的android – SQLite – 无法打开数据库文件全部内容,希望文章能够帮你解决android – SQLite – 无法打开数据库文件所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。