英文:
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",
...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论