我也跟着这样的:https://github.com/facebook/react-native/issues/2943如何从index.android.bundle生成.apk文件?
$ cd your_project_dir
$ npm start # start the packager if not started already
$ curl "http://localhost:8081/index.android.bundle?platform=android?dev=false" -o "android/app/src/main/assets/index.android.bundle"
并成功产生index.android.bundle
文件。但奇怪的是,这里没有任何内容解释了如何将其转化为版本.apk
文件。
编辑:
我所做的:
$ 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/
但android/app/src/main/res/
只有一个清单文件和应用程序的图标。没有.apk
文件。
你试图获得释放或调试APK? –
@ G.Hamaide一款发布apk。 – alex