我在expo框架的帮助下制作了一个react本机应用程序。但是当我尝试构建时,多次失败
这就是我的环境
EAS CLI 3.15.0 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 17.9.0 - D:\Node\node.EXE
npm: 8.5.5 - D:\Node\npm.CMD
Utilities:
Git: 2.41.0.
npmPackages:
expo: ^47.0.0 => 47.0.14
react: 18.1.0 => 18.1.0
react-native: 0.70.8 => 0.70.8
Project workflow: managed
这是错误日志。
1278 439 actionable tasks: 439 executed
1279 FAILURE: Build completed with 2 failures.
1280 1: Task failed with an exception.
1281-----------
1282* What went wrong:
1283 Execution failed for task ':expo-modules-core:prepareBoost'.
1284 > Could not read /home/expo/workingdir/build/node_modules/expo-modules-core/android/build/downloads/boost_1_76_0.tar.gz.
1285 > Not in GZIP format
1286 * Try:
1287 > Run with --stacktrace option to get the stack trace.
1288 > Run with --info or --debug option to get more log output.
1289 > Run with --scan to get full insights.
1290 ==============================================================================
1291 2: Task failed with an exception.
1292 -----------
1293 * What went wrong:
1294 java.lang.StackOverflowError (no error message)
1295 * Try:
1296 > Run with --stacktrace option to get the stack trace.
1297 > Run with --info or --debug option to get more log output.
1298 > Run with --scan to get full insights.
1299 ==============================================================================
我尝试重建三次,但没有任何反应。还是失败了
只需卸载您的@react-native-community/cli-platform-android 软件包并重新安装即可。它对我有用!
我已经找到了一个临时解决方案,直到实际问题得到解决。也可在以下 GitHub 页面
获取https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
npx patch-package expo-modules-core
我可以使用
npx expo run:android
进行本地构建。如果问题持续发生,请在以下文件中执行完全相同的操作。
node_modules>react-native>ReactAndroid>build.gradle