Error:Execution failed for task ':xxx:compileReleaseJavaWithJavac'.
来源:互联网 发布:南风知我意txt免费下载 编辑:程序博客网 时间:2024/06/06 05:14
首先找到自己出现这个错误的原因,可以移步http://blog.csdn.net/u014453811/article/details/54582426
其他包括配置环境变量之类的方法,如果work for you,那么congratulations
不过我就没那么幸运了,stackoverflow上面的方法hava nothing work for me
我的配置AS3.0 Canary1
gradle:
android { compileSdkVersion 25 buildToolsVersion "25.0.0" defaultConfig { ... jackOptions { enabled true } } buildTypes { ... } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 }}
项目配置如上图
gradle:
android {
compileSdkVersion 25
buildToolsVersion ‘25.0.0’
defaultConfig { minSdkVersion 19 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }}packagingOptions { exclude 'typedefs.txt' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt'}sourceSets { main { jniLibs.srcDirs = ['libs'] }}compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8}
}
Module配置如上图
根据java1.8的方式进行配置
通过上面的链接命令行查出的错误是:
编译器 (1.8.0_131) 中出现异常错误。如果在 Bug Database (http://bugs.java.com) 中没有找到该错误, 请通过 Java Bug 报告页 (http://bugreport.java.com) 建立该 Java 编译器 Bug。请在报告中附上您的程序和以下诊断信息。谢谢。com.sun.tools.javac.code.Symbol$CompletionFailure: 找不到java.lang.invoke.MethodType的类文件
分析应该是反射没有获取到方法,而我的baselib中用到的反射不多,而且牵扯到1.8 lambda表达式的只有一行代码
PageManager pageStateManager = PageManager.init(container, false, this::loadData);
试着将这行lambda表达式改成原始代码,make项目可以正常编译通过,不过具体还不太确定出现这个问题的具体原因,因为app配置和baselib的配置一致,而app中使用lambda未出现问题,有童鞋了解的话,还请不吝赐教
阅读全文
5 0
- Error:Execution failed for task ':xxx:compileReleaseJavaWithJavac'.
- Error:Execution failed for task ':app:compileReleaseJavaWithJavac'
- Execution failed for task ':app:compileReleaseJavaWithJavac'解决方案
- Error:Execution failed for task ':XXX:processReleaseResources'.
- Error:Execution failed for task ':xxx:compileDebugJavaWithJavac'.
- Error:Execution failed for task ':xxx:transformClassesWithDexForDebug'.
- 快速解决Error:Execution failed for task ':app:compileReleaseJavaWithJavac'. > Compilation failed; see th
- Error:Execution failed for task ':app:dexDebug'.
- Error:Execution failed for task ':app:compileDebugAidl'.
- Error:Execution failed for task ':app:packageDebug'.
- Error:Execution failed for task ':app:dexDebug'.
- Error:Execution failed for task ':asynctask:packageDebug'
- Error:Execution failed for task ':app:processDebugResources'.
- Error:Execution failed for task ':transformClassesWithDexForDebug'.
- Error:Execution failed for task ':transformClassesWithJarMergingForDebug'
- Error:Execution failed for task ':transformResourcesWithMergeJavaResForDebug'
- Error:Execution failed for task ':app:transformClassesWithDexForDebug&#
- Error:Execution failed for task ':processDebugResources'.
- Solr单集代码调用案例
- UVa12100
- Let the Balloon Rise
- [mark]Chrome webdriver 下载
- [机器学习入门] 李弘毅机器学习笔记-17(Unsupervised Learning: Deep Auto-encoder;无监督学习:深度自动编码器)
- Error:Execution failed for task ':xxx:compileReleaseJavaWithJavac'.
- String、StringBuffer、StringBuilder
- Document对象,Element对象和Node对象简介
- oracle数据库锁表问题
- 反射
- Linux下报错DH GEX group out of range的理解
- mock.js教程 2017-02-08 15:02:39| 分类: 浏览器调试|举报|字号 订阅 下载LOFTER我的照片书 | 由于近期项目需求改动比较大,对于数据的频繁
- HBase单机模式与分布式环境搭建
- java调python问题