任务 :app:bundleReleaseJsAndAssets 在捆绑中失败 [英] Task :app:bundleReleaseJsAndAssets FAILED in bundle
问题描述
我正在尝试制作 app.aab
但我不知道这里出了什么问题,我不断收到此异常.
React 原生版本是:0.62.2命令我使用 ./gradlew bundleRelease
我也尝试按照这个
我也遇到了同样的问题.当我尝试使用 ./gradlew assembleRelease
命令构建 apk 时,它在 app:bundleReleaseJsAndAssets
处失败并返回非零退出值.我终于找到了使用这些步骤的解决方案.
首先检查android/app/src/main
位置中是否存在assets文件夹,如果不存在,则创建一个新的名称'assets'.如果它已经存在则检查它是否包含名为index.android.bundle
的文件,如果是则删除它,如果不存在则继续.
从你的根目录开始:C:\Users\user_name\AppName
cd android
./gradlew clean
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
它在assets文件夹中创建index.android.bundle
命名的bundle文件../gradlew assembleRelease -x bundleReleaseJsAndAssets
它将在android\app\build\outputs\apk\release
位置为您提供发布 apk../gradlew bundleRelease -x bundleReleaseJsAndAssets
它将为您提供项目的 aab 文件.
这些步骤解决了我的问题.请尝试告诉我它是否有效
I am trying to make app.aab
but i don't know whats wrong here i am keep getting this exception.
React native version is : 0.62.2
command i am using ./gradlew bundleRelease
also i try to follow this link but same issue again.
help please...
I also faced the same issue. When I tried to build the apk using ./gradlew assembleRelease
command, it fails at app:bundleReleaseJsAndAssets
and returns non zero exit value. I finally found a solution using these steps.
First check if assets folder is exists or not in android/app/src/main
location, if not then create a new one name it 'assets'. If it exists already then check whether it contains file named index.android.bundle
, if yes then delete it and if not then proceed.
Start from your root directory: C:\Users\user_name\AppName
cd android
./gradlew clean
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
It creates theindex.android.bundle
named bundle file in assets folder../gradlew assembleRelease -x bundleReleaseJsAndAssets
it will gives you the release apk atandroid\app\build\outputs\apk\release
location../gradlew bundleRelease -x bundleReleaseJsAndAssets
it will gives you the aab file of your project.
These steps solved my problem. Please try and tell me if it works
这篇关于任务 :app:bundleReleaseJsAndAssets 在捆绑中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!