我是在uniapp-X项目下,使用了另一个uniapp项目的安卓证书打包。如果项目下删除uniCloud云函数目录的化,可以打包成功。但如果创建一个uniCloud就会打包失败。
错误日志如下:
Appid: UNI5CXXXXXX
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:10:27 Unresolved reference: InternalUniCloudConfig
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:121:29 Unresolved reference: InternalUniCloudConfig
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:122:5 'isDev' overrides nothing
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:123:5 'spaceList' overrides nothing
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:124:5 'debuggerInfo' overrides nothing
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:125:5 'secureNetworkEnable' overrides nothing
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/index.kt:126:5 'secureNetworkConfig' overrides nothing
e: file://[PackagePath]/wgtRoot/UNI5CXXXXXX/.uniappx/android/src/pages/index/index.kt:10:27 Unresolved reference: InternalUniCloudConfig
FAILURE: Build failed with an exception.
-
What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details -
Try:
Run with --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org. -
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileReleaseKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:148)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:134)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
诺贝尔逗逼奖 (作者)
仅创建了uniCloud目录,没有使用
2024-04-04 12:57
诺贝尔逗逼奖 (作者)
就是新建的uniappX的空白模板,然后创建uniCloud云开发环境,其它什么都不动,依然都不行,我试过。不知道是不是偶尔这样
2024-04-04 13:00
DCloud_uniCloud_WYQ
回复 8***@qq.com: 暂时关联一个服务空间或者去除uniCloud目录以及页面内用到的uniCloud api。后续会修复此问题
2024-04-07 14:09
诺贝尔逗逼奖 (作者)
回复 DCloud_uniCloud_WYQ: 关联了服务空间的,同时页面内没有使用uniCloud相关的api,也会打包错误。但是ios可以打包
2024-04-07 16:08
DCloud_uniCloud_WYQ
回复 8***@qq.com: 如果关联了服务空间就在项目里面加一个console.log(uniCloud.getCurrentUserInfo())再试试看能不能打包成功
2024-04-07 17:42
诺贝尔逗逼奖 (作者)
回复 DCloud_uniCloud_WYQ: 按你说的方法可行,能打包了
2024-04-09 08:50