TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac

今天项目中遇到一个问题,在网上找了一些解决方式,但是都没法解决,后来在日志中找到解决方法,查看日志的方式:gradlew  compileDebug --stacktrace -info,通过日志中的> Task :app:compileDebugJavaWithJavac FAILED
Putting task artifact state for task ':app:compileDebugJavaWithJavac' into context took 0.0 secs.
file or directory 'D:\FrameDemo\app\src\debug\java', not found
Up-to-date check for task ':app:compileDebugJavaWithJavac' took 0.038 secs. It is not up-to-date because:
  Task has failed previously.
All input files are considered out-of-date for incremental task ':app:compileDebugJavaWithJavac'.
Compiling with source level 1.8 and target level 1.7.
file or directory 'D:\FrameDemo\app\src\debug\java', not found
Compiling with JDK Java compiler API.

javacTask: 源发行版 1.8 需要目标发行版 1.8

找到原因,然后File-->Project Structure-->Source Compatibility和Target Compatibility改成相同的版本,问题就解决了


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值