更新HBuilderX最新版本后uni-app部分插件lemon-filePicker打包报错回退后打包成功
更新HBuilderX最新版本后uni-app部分插件lemon-filePicker打包报错回退后打包成功
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
Windows | win11 | HBuilderX |
操作步骤:
- HBuilderX升级到最新版本,打包报错
预期结果:
- 希望可以正确打包
实际结果:
Appid: __UNI__50BF897
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
e: file://[PackagePath]/wgtRoot/__UNI__50BF897/uni_modules/lemon-filePicker/utssdk/app-android/src/index.kt:77:74 Type mismatch: inferred type is Number but Int was expected
e: file://[PackagePath]/wgtRoot/__UNI__50BF897/uni_modules/lemon-filePicker/utssdk/app-android/src/index.kt:85:73 Type mismatch: inferred type is Number but Int was expected
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':uni_modules:lemon-filePicker:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 15sWarning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Error code = -5000
Error message:
UTS plugin @ uni_modules lemon-filePicker compile error!
更多关于更新HBuilderX最新版本后uni-app部分插件lemon-filePicker打包报错回退后打包成功的实战教程也可以访问 https://www.itying.com/category-93-b0.html
2 回复
在更新HBuilderX最新版本后,uni-app
项目中使用 lemon-filePicker
插件时出现打包错误,回退到旧版本后打包成功,这表明新版本的HBuilderX可能与 lemon-filePicker
插件存在兼容性问题。以下是可能的解决步骤:
1. 确认插件兼容性
- 检查
lemon-filePicker
插件的文档或GitHub仓库,确认它是否支持最新的HBuilderX版本。 - 如果插件未更新,可以联系插件作者或社区,寻求支持。
2. 检查错误日志
- 在打包失败时,查看控制台输出的错误日志,找到具体的报错信息。
- 常见的错误可能与依赖冲突、API变更或构建配置有关。
3. 更新插件
- 如果
lemon-filePicker
插件有更新版本,尝试更新到最新版,可能已经修复了兼容性问题。 - 更新插件命令:
npm install lemon-filePicker@latest