简体   繁体   中英

Do I need to prevent caching on Android emulator?

I am using PhoneGap to develop cross-device (simple) applications, and I am currently using eclipse with the Android Emulator. The problem I am encountering is that it does not appear like my code changes recently are reflected by the application installed on the emulator. I have tried uninstalling the application from the emulator, cleaning and re-building from within eclipse, but neither of those has worked.

Is there some manual script I need to run to re-install the .apk? I am a newbie at mobile development, so please bear with me. :)

Eclipse should automatically rebuild your application if the option is activated. Take a look for it at Project -> Build automatically

The ADT should reinstall an application if you run the project. Take a look at the console (not LogCat) of eclipse, you should see some information about reinstalling the application (at least thats when you deploy on a device).

If you want to try if a change was successfully made, try to use a log statement that you change as soon as you have the feeling that its not the current version. So you can find out if at least the deploy worked.

If nothing of that helped, we should dig deeper...

I had the same problem (my app did not get updated whatever acrobatics I was doing) until I simply refreshed the Project in Eclipse. The javascript files I am using in the project were edited in an external text editor, the HTML in Dreamweaver, so Eclipse apparently never pulled the renewed files from the file system, even after restart. Doing a refresh took care of that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM