
我正在尝试将代码推送添加到我的react native应用中,并按照https://github.com/Microsoft/react-native-code-push中提到的所有步骤进行 *** 作
完成之后,我的调试版本运行正常
我用 :
$./gradlew installDeBUG但是发布构建失败,这由以下命令给出:
$./gradlew installrelease这给出了以下错误:
:app:generateReleaseResources:app:mergeReleaseResources:app:bundleReleaseJsAndAssets FAILURE: Build Failed with an exception. * What went wrong: Could not List contents of '/Users/jayshah/documents/testdir/ExampleApp/node_modules/.bin/_mocha'.的GitHub
Microsoft / react-native-code-push
react-native-code-push-CodePush服务的React Native插件
我使用以下命令生成捆绑包:
curl "http://localhost:8081/index.androID.bundle?platform=androID" -o "androID/app/src/main/assets/index.androID.bundle"我的本机版本是0.18,
代码推送版本为0.16
解决方法:
原来这是在将React Native从0.15之前的版本升级到0.15以后的版本时经常遇到的问题.
react gradle任务bundleReleaseJsAndAssets似乎是罪魁祸首.
可以使用禁用它
enabled config.bundleInRelease ?: false 在react.gradle或注释行中(尽管不能保证工作正常)
inputs.files filetree(dir: reactRoot, excludes: inputExcludes)并使用
react-native bundle命令
react-native bundle --platform androID --dev false --entry-file index.androID.Js \ --bundle-output androID/app/src/main/assets/index.androID.bundle \ --assets-dest androID/app/src/main/res/或基于curl的命令
curl "http://localhost:8081/index.androID.bundle?platform=androID" -o "androID/app/src/main/assets/index.androID.bundle" 总结 以上是内存溢出为你收集整理的React Native Android Code Push InstallRelease构建失败全部内容,希望文章能够帮你解决React Native Android Code Push InstallRelease构建失败所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)