How do I rebuild java files in React Native?… here is a solution to the problem.
How do I rebuild java files in React Native?
I made changes to the file ReactWebViewManager.java
, which is a file in the react-native package. (The full path to the file is node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java
.) )。 But the changes I made to the file didn’t seem to take effect. I deleted the whole file to test this theory and the app continues to work fine, so it seems like I need to recompile/rebuild/clear the cache of react-native packages. Is there a way to do this?
Solution
Every time you change a Java file, just run the following command: react-native run-android