安卓编译报错Execution failed for task ‘:expo-modules-core:prepareBoost‘. Not in GZIP format的解决方案
作者: Kovli
重要通知:红宝书第5版2024年12月1日出炉了,感兴趣的可以去看看,https://u.jd.com/saQw1vP
红宝书第五版中文版
红宝书第五版英文原版pdf下载(访问密码: 9696)
报错如下
[RUN_GRADLEW] Execution failed for task ':expo-modules-core:prepareBoost'. [RUN_GRADLEW] > Could not read /tmp/adam/eas-build-local-nodejs/.../expo-modules-core/android/build/downloads/boost_1_76_0.tar.gz. [RUN_GRADLEW] > Not in GZIP format
原因:https://boostorg.jfrog.io/artifactory/main/release/ 下面已经没有boost_1_76_0.tar.gz了,下载不到了
解决方法一:
Step 1: Update URL in ReactAndroid Build Script
Navigate to the file: /node_modules/react-native/ReactAndroid/build.gradle
Locate the following line:
https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
Replace it with:
https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
Step 2: Update URL in Expo Modules Core
Go to the file: /node_modules/expo-modules-core/android/build.gradle.
Search for the same URL as in Step 1.
Replace it with the new URL provided in Step 1.
Step 3: Apply the Patches
After making the changes, run the following commands to apply the patches:
patch-package react-native
patch-package expo-modules-core
这里如果提示没有patch-package,可以改用命令
npx patch-package expo-modules-core
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?