Go back to debugging after created release version with react-native bundle (Android)

不打扰是莪最后的温柔 提交于 2019-12-04 13:45:17
  • Delete assets folder in app/src/main/
  • Remove this import line if exist : "import com.facebook.react.BuildConfig;" in MainApplication.java
  • Run "react-native run-android"

And boom!

My quickest way is openning the file: $projectRoot\android\app\src\main\java\com\movies\MainApplication.java, going to the code like:

public boolean getUseDeveloperSupport() {
 return false; //it was changed to false from BuildConfig.DEBUG when released
}

then changing the false to true to make the debug menu available again.

It happens with wrong import statement in MainApplication.java, You have to check if any statement like import com.facebook.react.BuildConfig; is in the imports. If so, remove that and run react-native run-android

No need to delete assets folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!