![](/img/trans.png)
[英]react-native hellow world app - working in emulator but not in physical device
[英]Android app with react-native works on emulator but doesn't on physical device
组装Release / Debug apk并将其安装在物理智能手机上时,我遇到了同样的问题
在您的项目目录中执行以下命令:
mkdir android/app/src/main/assets
(如果您拥有资产文件夹,则会看到类似directory is already exist
错误……没问题!转到下一个命令)
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android
或组装apk
它应该工作不错
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.