使用 react-native bundle (Android) 创建发布版本后返回调试 [英] Go back to debugging after created release version with react-native bundle (Android)

查看:38
本文介绍了使用 react-native bundle (Android) 创建发布版本后返回调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我使用 React Native 创建了我的应用程序,并且刚刚生成了我的第一个发布版本.我现在的问题是我无法回到对原生调试模式的反应.

按照文档,这就是我所做的.

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/

此代码生成了捆绑的 index.android.bundleindex.android.bundle.meta

现在每次执行 react-native run-android 时,javascript 代码库都不会更新应用程序,而且我无法访问应用程序中的开发(摇动)菜单.>

如果我再次运行 react-native bundle,代码会更新.

我想这是一个简单的问题,但找不到任何有关如何返回的信息,因此该应用不再使用捆绑版本.

解决方案

  • 删除app/src/main/中的assets文件夹
  • 删除此导入行(如果存在):import com.facebook.react.BuildConfig;"在 MainApplication.java 中
  • 运行react-native run-android"

还有繁荣!

So I have created my Application using React native and just produced my first release-build. My problem now is that I can't get back to react natives debug-mode.

By following the documentation, this is what i did.

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/

This code generated the bundled index.android.bundle and index.android.bundle.meta

Now every time I execute react-native run-android, the javascript code-base wont update the application and I am not able to access the development(shake) menu in my app.

If I run react-native bundle again, the code will update.

I guess this is a simple issue, but can't find any information how to return so the app isn't using the bundled version anymore.

解决方案

  • 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!

这篇关于使用 react-native bundle (Android) 创建发布版本后返回调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆