安卓编译报错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

解决方法二:下载后将里面的boost_1_76_0.tar.gz放到/node_modules/expo-modules-core/android/build/downloads/文件夹里

下载地址(访问密码: 9696)

posted @   kovli  阅读(58)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示