失败:生成失败,发生异常。

  • 出了什么问题:
    任务':app:compileDebugJavaWithJavac'的执行失败。


  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获取完整的见解。
  • https://help.gradle.org上获得更多帮助

  • 在4m 10s内失败

    最佳答案

    将此代码放在android块中的应用程序级别build.gradle中。

     compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    

    08-18 15:53
    查看更多