问题描述
我已经使用Cordova cli几年了。今天我从Cordova 5.4.0更新到6.0.0
I've been using Cordova cli for a couple years now. Today I updated from Cordova 5.4.0 to 6.0.0
npm install -g cordova@latest
然后我将Android平台更新到上一版本的5.1.0
then I updated android platform to 5.1.0 from the previous version
cordova platform update android
运行
cordova run android
注意到我的设备上的图标已更换,并添加到所有应用程序的结尾。更重要的是缺少localstorage数据。不只是一次,但每次我运行它。很久以前,我遇到这个问题,当我从一个不同的包名重新从头开始。这只是上面的命令。程序包名称未更改。对于这个问题在config.xml和AndroidManifest.xml没有什么改变。
Noticed the icon on my device was replaced and added to the end of all apps. More importantly the localstorage data is missing. Not just once but each time I run it. Long ago I ran into this issue when I rebuilt from scratch with a different package name. This was just the commands above. The package name didn't change. For that matter nothing changed in config.xml nor AndroidManifest.xml
任何线索从哪里开始。它每次运行时清除存储
Any clues where to start. It clears storage each time I run
cordova run android
在设备上停止和重新启动时保存数据。引用这些行从未在配置中更改
It holds the data when stopping and restarting on the device. For reference these lines never changed in config
<preference name="AndroidPersistentFileLocation" value="Internal" />
<preference name="AndroidExtraFilesystems" value="files" />
config.xml中的包名以-dev结尾,
The package name in config.xml ends in -dev as always which I take off before building a release.
更新时间2016-02-22
这可能与
如果我正在阅读,
Update 2016-02-22This may be related https://issues.apache.org/jira/browse/CB-10157If I'm reading that right it will be fixed on android 5.2.0, I could not find any info on when that may occur.
推荐答案
感谢您链接您的问题
在我的例子中,它确实与CD-10157有关。
但是它已经修复了版本5.1.1,已于3月2日发布。
In my case it was indeed related to CD-10157.It did however get fixed with Version 5.1.1 already, which was released March 2nd.
我刚刚升级到今天早上的最新版本,现在看起来工作正常。
I just upgraded to the latest version this morning, and it seems to be working fine now.
这篇关于Cordova 6.0.0更新后不断丢失存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!