getting latest changes on Android device??


#1

This is my current process for Android and it’s not working very well. Very frustrating as I spend most of my time trying to get js changes to load. App is ejected and I have latest expo v2.11.2:

  1. make changes to js files
  2. ctrl+c on expo cli cmd line to stop expo
  3. stop app from Android studio
  4. hard kill app on device
  5. run expo start again after saving js changes
  6. run app on device from Android studio

Almost every time my javascript bundle does not update and I don’t see my changes. What am I doing wrong?? Can anyone suggest a better workflow? At one point I did get the dev menu up but enabling hot reloading caused a bunch of runtime errors.

I have resorted to uninstalling the app and running expo start -c, and even then sometimes the latest code will not load.

Currently on a Nexus 6P with API 26. Shaking the device never produces the dev menu btw. Same issues with Pixel 3 although it’s a bit better.


#2

Hey @helium!

That is odd, but I’ll need some help from you if I’m going to re-create this issue.

What SDK version are you running?
Also, as stated in ExpoKit’s documentation, did you make sure to not upgrade the version of Gradle when prompted?

Thanks! Hopefully we can figure this out


#3

Hi Charlie, can’t recall but I don’t think I upgraded the gradle version when prompted.

Anyway, I did at least temporarily resolve this by completely removing the updates property from app.json, saving and restarting. That caused hot reloading to start working and dev menu is consistently showing up on device shake.

Even though the expo docs say that checkAutomatically and fallbackToCacheTimeout are ignored with expo cli, I think there may be a bug there.

This was my previous updates config:
“updates”: {
“checkAutomatically”: “ON_ERROR_RECOVERY”,
“enabled”: false
},

I currently have it like this, as I want Android built with the entire bundle inside (no OTA):
“updates”: {
“fallbackToCacheTimeout”: 30000,
“checkAutomatically”: “ON_LOAD”,
“enabled”: false
},

For whatever reason this setting is working well. Thanks!


#4

Good to hear that it was resolved!

Also, in our docs, it states that checkAutomatically: "ON_ERROR_RECOVERY" is ignored in the Expo Client, as well as “enabled”: false, but I don’t see it saying fallbackToCacheTimeout is ignored. That would explain why changing those fields in your app.json resulted in changes.