cordova build has erased my files - can they be found

孤街醉人 提交于 2019-12-06 10:56:57

I would be surprised if Cordova made backups. But as you mention Eclipse the data may still exist as local history: Package Explorer > Context menu for the project > Restore from Local Histoy....

While this is not the answer, I figured I would expound on my experience with IntelliJ and the resetting of the project back to stock phonegap app (maybe the reason for this was the same). I once used Eclipse, but since trying IntelliJ I will never use Eclipse again unless required.

Being late at night, I decided to get ramped up on some PhoneGap development. Because that is the best time to learn something, when your brain is frazzled from the work day.

I followed the standard procedure to get a base phonegap project started (using the command line), and did an Import into IntelliJ from existing source. Import went fine, or so I thought.

Being late at night / early in the morning, I went straight to assets/www and started tinkering. Not knowing really much about the phonegap build process yet, I did not realize I was developing out of the android platform assets www folder. I could run my project fine in IntelliJ, changes were showing up in my VM.

But the minute I did a phonegap build android (or cordova build android, whichever), it took everything from my unedited root\www folder and did the build, resetting everything I had done in android platform www folder. Luckily IntelliJ has a local history.

So for now my solution is to add the root\www folder as a source root in IntelliJ and make sure to modify THAT. I probably need to modify my run configurations as well to do a full build / deploy, but I have not got that far yet.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!