Android Stdio Execution failed for task ‘:app:compileDebugKotlin‘ 报错解决

这篇具有很好参考价值的文章主要介绍了Android Stdio Execution failed for task ‘:app:compileDebugKotlin‘ 报错解决。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

具体报错信息如下:

'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17)
 jvm target compatibility should be set to the same Java version.

很显然,这是一个版本冲突问题,compileDebugJavaWithJavac版本是1.8,compileDebugKotlin是17。我们只需将这两个版本改成同一个即可,在build.gradle中添加以下代码:

kotlinOptions {
        jvmTarget = "1.8"
    }

如下图所示:
execution failed for task ':app:compiledebugkotlin'. > 'compiledebugjavawith,报错解决,Android,android,java,kotlin文章来源地址https://www.toymoban.com/news/detail-853125.html

到了这里,关于Android Stdio Execution failed for task ‘:app:compileDebugKotlin‘ 报错解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 成功解决Execution failed for task ‘:app:checkDebugAarMetadata‘

    yarn android 的时候出现这个错误: Execution failed for task ‘:app:checkDebugAarMetadata’ 详细错误信息如下 Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’. Could not find com.android.support.constraint:constraint-layout:1.1.3. Searched in the following locations: - https://jcenter.bintray.com/com/android/su

    2024年02月06日
    浏览(27)
  • 打包apk时出现Execution failed for task ‘:app:lintVitalRelease

    程序可以正常运行,但是打包apk的时候报Execution failed for task ‘:app:lintVitalRelease导致打包失败,原因是执行lintVitalRelease失败了,存在错误。解决办法:在app模块的build.gradle的Android里面添加如下代码:  

    2024年02月11日
    浏览(27)
  • 关于Android Studio编译时提示Execution failed for task ‘:xxx:compileDebugJavaWithJavac‘

    在项目首次导入编译时,总是会出现一些比较难排除的问题,特别是在提示中无法直接找到原因: 这里我使用的是Android Studio 2021.3.1 故在Terminal输入 这里的提示是项目的gradle缺少gradle-wrapper.properties文件,我的解决方案是: 从其他项目中拷贝一份gradle-wrapper.properties

    2024年02月11日
    浏览(73)
  • 【已解决】Task :app:compileDebugKotlin FAILED

    给android项目改App ID,修改了模块名后,编译出现了这个问题。 1.尝试了统一kotlin版本,Android Studio Tools - Kotlin - Configure Kotlin Plugin Updates    查看目前Kotlin版本,以及在项目找kotlin-version(不同项目展现方式不同,一般是在build.gradle),将项目的Kotlin版本改为Android Studio上的版

    2024年02月13日
    浏览(32)
  • React Native报错Task :app:compileDebugKotlin FAILED

    \\\"react-native\\\": \\\"0.73.1\\\", \\\"react-native-safe-area-context\\\": \\\"^4.8.2\\\", distributionUrl=https://services.gradle.org/distributions/gradle-8.3-all.zip 安装react-native-safe-area-context后一直编辑不通过,查了好久,终于找到原因: Task :app:compileDebugKotlin FAILED Deprecated Gradle features were used in this build, making it incompatible w

    2024年01月23日
    浏览(32)
  • 已解决org.gradle.api.tasks.TaskExecutionException: Execution failed for task

    已解决org.gradle.api.tasks.TaskExecutionException: Execution failed for task org.gradle.api.tasks.TaskExecutionException: Execution failed for task org.gradle.api.tasks.TaskExecutionException: Execution failed for task的详细解决方法可能会因具体情况而异。 下滑查看解决方法 但通常情况下,这个错误是由于 Gradle 任务的执

    2024年02月08日
    浏览(31)
  • Android问题笔记 - 编译报错Task :app:compileDebugJavaWithJavac FAILED

    专栏分享 点击跳转=Unity3D特效百例 点击跳转=案例项目实战源码 点击跳转=游戏脚本-辅助自动化 点击跳转=Android控件全解手册 点击跳转=Scratch编程案例 点击跳转=软考全系列 众所周知,人生是一个漫长的流程,不断 克服困难 ,不断反思前进的过程。在这个过程中会产生很多对

    2024年02月17日
    浏览(38)
  • android studio 我遇到的Task :app:compileDebugJavaWithJavac FAILED问题及解决过程

    前几天一个网友在学习我的一个小项目的时候,发现无法达到目的,在帮他解决问题的过程中发现他用的是最近的giraffe版本的as,我用的是老版本,没办法打开他的项目,没办法只能卸载我的as,安装了最近版的diraffe版。也成功帮网友解决了问题。本来想着退回之前的版本,

    2024年02月04日
    浏览(42)
  • ‘compileDebugJavaWithJavac‘ task (current target is 1.8) and ‘compileDebugKotlin‘ task (current targ

    \\\'compileDebugJavaWithJavac\\\' task (current target is 1.8) and \\\'compileDebugKotlin\\\' task (current target is 17) jvm target compatibility should be set to the same Java version. 出现这种情况是因为你电脑安装的jdk版本是1.8,而你Android studio设置为17,这就要求你在电脑端升级安装17版本的jdk,否则就编译不了。 就是下

    2024年02月22日
    浏览(38)
  • docker failed to create task for container: failed to create shim task: OCI runtime create failed:

    根据CentOS安装docker指南,启动hello-world时报错,提示信息中提到了 OCI runtime ,根本原因是 runc did not terminate successfully 参考【错误解决】docker找不到runc:failed to create shim: OCI runtime create failed: unable to retrieve OCI runtime,这个问题跟 runc 有关,查看docker版本的确没有runc信息 查看

    2024年02月14日
    浏览(44)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包