2016-05-23 68 views
0

我想使用鈦加速器sqlite功能將我的遠程數據保存到數據庫。 當我wanto編譯應用程序,文件夾的ressource在我的文件myDb.sqlite由工作室刪除,我得到錯誤:Titanium appcelerator從資源文件夾中刪除sqlite文件?

[ERROR] : Script Error { 
[ERROR] :  column = 37; 
[ERROR] :  line = 18; 
[ERROR] :  message = "Could not retrieve attributes"; 
[ERROR] :  nativeLocation = "-[TiDatabaseProxy install:name:] (TiDatabaseProxy.m:136)"; 
[ERROR] :  nativeReason = "Error Domain=NSCocoaErrorDomain Code=260 \"The file \U201cremote.sqlite\U201d couldn\U2019t be opened because there is no such file.\" UserInfo={NSFilePath=/Users/esy/Library/Developer/CoreSimulator/Devices/44EEB566-359A-46BD-A456-C13DF1D4CF87/data/Containers/Bundle/Application/B274965B-515E-4785-B17A-AF36A457C034/syncAdapterDemo.app/mydata/remote.sqlite, 

你能解釋一下爲什麼嗎?以及我確切地可以存儲這個文件的地方?

謝謝你的幫助。

+0

請幫忙嗎? – user44321

回答

0

這是一個合金的應用程序?

如果是,那麼我會建議將文件放在app/assets文件夾中。

上生成,它就會坐在你的項目的根,你可以訪問它像這樣:

Ti.Database.install('/yourDb.sql', 'yourDb);的安裝。

相關問題