如何在android上使用离线捆绑?
我没有在android上看到关于使用offline bundle的文档.
我试图取消注释build.gradle中的代码.
project.ext.react = [
// the name of the generated asset file containing your JS bundle
bundleAssetName: "index.android.bundle",
// the entry file for bundle generation
entryFile: "index.android.js",
// whether to bundle JS and assets in debug mode
bundleInDebug: false,
// whether to bundle JS and assets in release mode
bundleInRelease: true,
// the root of your project, i.e. where "package.json" lives
root: "../../",
// where to put the JS bundle asset in debug mode
jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
// …Run Code Online (Sandbox Code Playgroud) 我将所有静态图像放在项目根目录中名为"images"的文件夹中.但是,在我运行以下命令捆绑我的应用程序后,该应用程序可以正常工作,但没有显示图像.
我用来捆绑的命令:
./react-native bundle --minify --entry-file index.ios.js --platform ios --dev false --bundle-output main.jsbundle --assets-dest ./assets
Run Code Online (Sandbox Code Playgroud)
请注意,资源文件夹已创建,它包含我的图像文件夹,所有图像都可以.
你能帮帮忙吗?