How to rebuild the entire Android folder?

后端 未结 8 2135
长发绾君心
长发绾君心 2021-01-31 17:44

I have messed the files up in the Android folder and would like to rebuild the Android project inside of the Android folder. How do I do this?

Is it safe to delete the

8条回答
  •  [愿得一人]
    2021-01-31 18:06

    Here my solution: (I'm doing this for android)

    First command:(Navigation to the Android folder of your react-native project)

    cd Android
    

    Second command:

    ./gradlew clean
    

    Third commmand:

    ./gradlew cleanBuildCache
    

    I'm not fan of deleting android folder. (I think this not a best approaches)

    To generate apk file for production: (First one from /Android)(second one from root project)

    ./gradlew bundleRelease
    react-native run-android --variant=release
    

    Happy coding!!!

提交回复
热议问题