gpt4 book ai didi

javascript - 未设置 Assets 目标文件夹跳过 native react (图像未在 APK 中加载)

转载 作者:行者123 更新时间:2023-12-03 13:40:37 26 4
gpt4 key购买 nike

我正在用这个命令:

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

输出
扫描 C:\Users\mgaba\Desktop\InfraGBU\node_modules 中的符号链接(symbolic link)文件夹(86ms)
扫描 C:\Users\mgaba\Desktop\InfraGBU\node_modules 中的符号链接(symbolic link)文件夹(94ms)
加载依赖图,完成。
捆绑:将捆绑输出写入:android/app/src/main/assets/index.android.bundle
捆绑:完成编写捆绑输出
** Assets 目标文件夹未设置,跳过...
**

因此我将无法看到 apk 中的图像。图像未加载,请帮助消除此错误。

最佳答案

试试这个,它对我有用

适用于安卓

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/

编辑

适用于 iOS

react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle --assets-dest ios

谢谢@kalpa

关于javascript - 未设置 Assets 目标文件夹跳过 native react (图像未在 APK 中加载),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51078749/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com