开发者问题收集

React Native Expo 错误。我该怎么办?

2021-02-27
2698

这是错误 :--

[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #7: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #6: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #5: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:51 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #4: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #1: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:52 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #2: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #3: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
[stderr] AAPT2 aapt2-4.0.0-6051327-linux Daemon #0: Idle daemon unexpectedly exit. This should not happen.
Sat, 27 Feb 2021 18:14:53 GMT
Error: ./gradlew exited with signal: SIGKILL
    at ChildProcess.completionListener (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:51:23)
    at Object.onceWrapper (events.js:418:26)
    at ChildProcess.emit (events.js:311:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
    ...
    at spawnAsync (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnAsyncThrowError (/app/turtle/node_modules/@expo/xdl/build/detach/ExponentTools.js:201:45)
    at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:976:11)
    at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:396:5)
    at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
    at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
    at async build (/app/turtle/build/jobManager.js:181:33)
    at async processJob (/app/turtle/build/jobManager.js:118:32)
    at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
    at async main (/app/turtle/build/server.js:66:13)

此错误与 Expo React Native 有关。

在我运行命令 expo build:android 之前,一切都运行正常。

这是所有 日志 的 URL。

Abhyuday Tripathi

3个回答

就我而言,我只是关闭并重新打开终端并运行以下命令:

expo build:android -t apk
Zain SMJ
2021-03-05

什么也不要做,再试一次。这不是你的问题。

user3808641
2021-03-02

在更新我的全局 Expo npm 包后,我遇到了非常相似的错误。 由于某种原因,一个始终可以构建的应用程序在构建过程中因该错误而崩溃。

由于我没有对实际应用程序进行任何更改,我从 expo.io 中删除了应用程序/项目,并使用 expo build 命令重建了它。这使得构建成功。

我只是把这个留在这里作为答案,以防有人在更新 Expo 后遇到同样的错误。

Stephan Bakkelund Valois
2021-03-24