IONIC 6 Build Issue Execution failed for task ':capacitor-splash-screen:compileDebugJavaWithJavac'. > error: invalid source release: 17

huangapple go评论60阅读模式
英文:

IONIC 6 Build Issue Execution failed for task ':capacitor-splash-screen:compileDebugJavaWithJavac'. > error: invalid source release: 17

问题

我是新手使用IONIC,尝试添加启动画面和标志。 IONIC Build android 正常工作,但当我尝试在Android Studio中构建项目时,我收到以下错误消息:

执行任务“:capacitor-splash-screen:compileDebugJavaWithJavac”失败。
> 错误:无效的源发布版本:17

我正在使用Capacitor来构建项目。

英文:

I am new to IONIC and trying to add splash screen and logo. IONIC Build android works fine but when I try to build project in android studio I am getting following error

Execution failed for task ':capacitor-splash-screen:compileDebugJavaWithJavac'.
> error: invalid source release: 17

I am using capacitor to build the project

答案1

得分: 1

This seems like an issue with your @capacitor/splash-screen version in your package.json.

尝试使用旧版本。

It could also be related to other capacitor packages, for me it showed up when I used a higher version of @capgo/capacitor-updater.

我将它更改为:@capgo/capacitor-updater: ^4.17.46
and it works.

所以,总结一下,我的当前 package.json 如下:

...
"@capacitor/splash-screen": "^4.2.0",
"@capgo/capacitor-updater": "^4.17.46",
...
英文:

This seems like an issue with your "@capacitor/splash-screen" version in your package.json.

Try using an older version.

It could also be related to other capacitor packages, for me it showed up when I used a higher version of "@capgo/capacitor-updater".

I changed it to: "@capgo/capacitor-updater": "^4.17.46",
and it works.

So to summarise my current package.json looks like this:

...
"@capacitor/splash-screen": "^4.2.0",
"@capgo/capacitor-updater": "^4.17.46",
...

huangapple
  • 本文由 发表于 2023年5月17日 23:26:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76273742.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定