When i try to run on android the latest code is not updating. However, i can see the changes on IOS device. I tried reseting the cache react-native start --reset-cache
, i reinstalled watchman.But nothing helps me. Could anyone figure it out?
finally i got the issue.I run the command react-native log-android
and i got this error adb invocation failed
so i link adb with exporting path.
echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile
3. source ~/.bash_profile
Now code are reflected on android device too.
Make sure React Native Server is running. If it is not running than do following
steps :
1) go to project path : cd '/home/himanshu/ReactNative_CLI/DemoApp'
2) Execute this command to start server: "react-native start"
3) if project not running : "react-native run-android"
4) Save file on your editor and you can see the changes on your device / emulator:
Note: make sure you have enabled reload on device / emulator :
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.