构建失败:Gradle 构建失败,出现未知错误。有关详细信息,请参阅“运行 gradlew”阶段的日志

Build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information

提问人:Arun Jojo 提问时间:8/3/2023 更新时间:8/4/2023 访问量:511

问:

任务:expo-splash-screen:compileReleaseKotlin 失败

[斯特德]

e:file:///home/expo/workingdir/build/node_modules/expo-splash-screen/android/src/main/java/expo/modules/splashscreen/SplashScreenReactActivityLifecycleListener.kt:16:3 'onContentChanged' 不会覆盖任何内容

任务:app:createBundleReleaseJsAndAssets

info 将捆绑包输出写入:, /home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle

info 将 sourcemap 输出写入:, /home/expo/workingdir/build/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map

info 完成编写捆绑包输出

info 完成编写 sourcemap 输出

info 复制 25 个资产文件

info 完成复制资产

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:2728:18:警告:未在函数“__shouldPauseOnThrow”中声明变量“DebuggerInternal”

[斯特德]

      typeof DebuggerInternal !== 'undefined' &&

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:11514:7:警告:未在函数“logCapturedError”中声明变量“setTimeout”

[斯特德]

  setTimeout(function () {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle

[斯特德]

:9474:108:警告:变量“nativeFabricUIManager”未在函数“onChange”中声明

[斯特德]

...lInstanceHandle ?(from && nativeFabricUIManager.setIsJSResponder(from.sta...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:10095:21:警告:未在匿名函数“264#”中声明变量“clearTimeout”

[斯特德]

cancelTimeout = clearTimeout;

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:13845:30:警告:变量“REACT_DEVTOOLS_GLOBAL_HOOK”未在匿名函数“264#”中声明

[斯特德]

if (“undefined” !== typeof REACT_DEVTOOLS_GLOBAL_HOOK) {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:15730:5:警告:未在函数“handleResolved”中声明变量“setImmediate”

[斯特德]

setImmediate(function () {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19906:12:警告:未在匿名函数“499#”中声明变量“fetch”

[斯特德]

fetch: fetch,

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19907:14:警告:变量“Headers”未在匿名函数“499#”中声明

[斯特德]

Headers: Headers,

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19908:14:警告:变量“Request”未在匿名函数“499#”中声明

[斯特德]

Request: Request,

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19909:15:警告:变量“Response”未在匿名函数“499#”中声明

[斯特德]

Response: Response

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20066:24:警告:变量“FileReader”未在函数“readBlobAsArrayBuffer”中声明

[斯特德]

  var reader = new FileReader();

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:

[斯特德]

20117:36:警告:变量“Blob”未在匿名函数“510#”中声明

[斯特德]

    } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20119:40:警告:变量“FormData”未在匿名函数“510#”中声明

[斯特德]

    } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20121:44:警告:变量“URLSearchParams”未在匿名函数“510#”中声明

[斯特德]

...e if (support.searchParams & & URLSearchParams.prototype.isPrototypeOf(body...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20240:26:警告:变量“AbortController”未在匿名函数“516#”中声明

[斯特德]

      var ctrl = new AbortController();

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20373:23:警告:变量“XMLHttpRequest”未在匿名函数“520#”中声明

[斯特德]

    var xhr = new XMLHttpRequest();

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19919:71:警告:变量“self”未在匿名函数“502#”中声明

[斯特德]

...undefined' & & globalThis ||typeof self !== 'undefined' && self ||

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:23870:27:警告:未在匿名函数“670#”中声明变量“performance”

[斯特德]

if (“object” === typeof performance && “function” === typeof performance.no...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:23893:26:警告:变量“navigator”未在匿名函数“670#”中声明

[斯特德]

“undefined” !== typeof navigator && undefined !== navigator.scheduling & & u...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24003:37:警告:变量“MessageChannel”未在匿名函数“670#”中声明

[斯特德]

};else if (“undefined” !== typeof MessageChannel) {

[斯特德]

                                ^~~~~~~~~~~~~~

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24018:34:警告:变量“nativeRuntimeScheduler”未在匿名函数“670#”中声明

[斯特德]

... = “undefined” !== typeof nativeRuntimeScheduler ?nativeRuntimeScheduler...。

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:36720:34:警告:变量“requestAnimationFrame”未在函数“start 9#”中声明

[斯特德]

...this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle

[斯特德]

:70072:20:警告:变量“localStorage”未在函数“ColorSchemeStore”中声明

[斯特德]

if (typeof localStorage !== “未定义”) {

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75070:29:警告:未在函数“getMethod”中声明变量“IDBDatabase”

[斯特德]

if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop =...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75079:37:警告:未在函数“getMethod”中声明变量“IDBIndex”

[斯特德]

!(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || ...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75079:48:警告:未在函数“getMethod”中声明变量“IDBObjectStore”

[斯特德]

...ame in (useIndex ?IDBIndex : IDBObjectStore).prototype) ||!(isWrite || r...

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75133:94:警告:未在函数“getIdbProxyableTypes”中声明变量“IDBCursor”

[斯特德]

...abase、IDBObjectStore、IDBIndex、IDBCursor、IDBTransaction]);

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75133:105:警告:

[斯特德]

变量“IDBTransaction”未在函数“getIdbProxyableTypes”中声明

[斯特德]

...ctStore、IDBIndex、IDBCursor、IDBTransaction]);

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75188:32:警告:未在函数“error 2#”中声明变量“DOMException”

[斯特德]

    reject(tx.error || new DOMException('AbortError', 'AbortError'));

[斯特德]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75280:26:警告:未在函数“wrap 1#”中声明变量“IDBRequest”

[斯特德]

if (value instanceof IDBRequest) return promisifyRequest(value);

任务:expo-file-system:compileReleaseKotlin

任务:expo-modules-core:buildCMakeRelWithDebInfo[x86_64]

w:在 build/kotlin/sessions 中检测到多个 Kotlin 守护进程

299 个可操作任务:299 个已执行

[斯特德]

失败:生成失败,出现异常。

[斯特德]

  • 出了什么问题:

[斯特德]

任务“:expo-splash-screen:compileReleaseKotlin”执行失败。

[斯特德]

执行 org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction 时出错

[斯特德]

编译错误。有关更多详细信息,请参阅日志

[斯特德]

  • 尝试:

[斯特德]

使用 --stacktrace 选项运行以获取堆栈跟踪。

[斯特德]

使用 --info 或 --debug 选项运行以获取更多日志输出。

[斯特德]

使用 --scan 运行以获得完整的见解。

[斯特德]

[斯特德]

在 5 分 41 秒内构建失败

错误:Gradle 构建失败,出现未知错误。有关详细信息,请参阅“运行 gradlew”阶段的日志。

react-native expo build.gradle gradlew eas

评论

0赞 Maksim Eliseev 8/3/2023
请重新格式化您的问题,并将输出放在“代码示例”部分。并描述您的问题。
0赞 Community 8/3/2023
请编辑问题,将其限制在特定问题上,并具有足够的细节以确定适当的答案。

答:

0赞 oren 8/4/2023 #1

我认为错误出现在版本之后。您应该检查相关问题。尝试升级到 ~49.0.6"expo-splash-screen": "~0.20.5"expo-splash-screenexpo

Execution failed for task ':expo-splash-screen:compileReleaseKotlin'.