I have a very strange phenomenon with React-Native
. I have been working with the iOS simulator
mainly but wanted to test my code on my Android
phone, a Huawei Nexus 6P
. Even after removing the old app from the 6P
an older version of my code is run. Yes, I have updated index.android.js
to match index.ios.js
and, to prove it should work, a Genymotion
simulator of the 6P
runs the correct code.
I even tested a Kotlin Android
project I'm building and when I ran that on my 6P
any updates to the code were shown as expected.
I will also mention, though it's probably not relevant, I recently (before this problem) had a separate issue that lead me to run sudo ./gradlew clean
after CD
ing into the Android
folder of my project as described in this answer. That didn't fix my issue but I wonder has it somehow 'corrupted' Gradle
for my project? Is there a way I can 're-init' or something?
I'm really struggling to understand what could be wrong here, especially since the simulator is updated correctly. Any help is welcome!
UPDATE:
After a helpful tip to clear the cache of the app from bennygenel
I did the following and reran react-native run-android
but sadly I still have the same problem:
- Cleared Cache for the App
- Cleared the Data
- Force Stopped the App
- Uninstalled the App
This is very odd indeed!