在androidstuio中运行我的未完项目,报错:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Java\JDK\bin\java.exe'' finished with non-zero exit value 2

然后我们卸载了java,特意重新按装到c盘,没想到

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2

同样的错误,引入三方包后编译时抛出这种异常的

---------------------------------------------------------------------------------------------------------------------------------------------------------------

网上有人提出在build.gradle文件中加入:

defaultConfig {
    multiDexEnabled true
}

然后我试了:又报这样的错:

无法解决,再找别的办法

=======================================终    于   找   到    啦===================================================================

我打开project目录,我的app中自带有android_support_v4.xml,表明它是支持v4的,这是默认的,肯定有

然后我在我的第一个引用的library下的libs文件夹中也发现了android_support_v4.jar的jar包,我就把这个jar包给删了,然后重新clean,----run 运行成功了,

问题解决了,总结就是一定有重复的引用library或者jar包。

其实我又有疑问了,我的项目在引进我的library时,一直运行的好好的,并没有删除v4.jar包的,而是突然之间出了问题,这个我是挺困惑了,虽然问题解决了,但是仍然没有完全理解,惭愧

安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决的更多相关文章

  1. Android studio中的一次编译报错’Error:Execution failed for task ':app:transformClassesWithDexForDebug‘,困扰了两天

    先说下背景:随着各种第三方框架的使用,studio在编译打包成apk时,在dex如果发现有相同的jar包,不能创建dalvik虚拟机.一个apk,就是一个运行在linux上的一个虚拟机. 上图就是一直 ...

  2. Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录

    转载请标明出处: http://blog.csdn.net/lxk_1993/article/details/50511172 本文出自:[lxk_1993的博客]:   3个错误non-zero e ...

  3. 安卓开发遇到Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

    问题如下: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api. ...

  4. Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

    使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...

  5. Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.Exec

    Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.tr ...

  6. 遇到Error:Execution failed for task ':app:transformClassesWithDexForDebug'的解决方案

    原因:项目中包含了所有的google play service 解决:只需要使用必要的服务即可 将compile 'com.google.android.gms:play-services:8.1.0 ...

  7. 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法

    Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...

  8. Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException总结

    最新项目中遇到了 Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.Proces ...

  9. Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f

    今天调试安卓程序遇到的问题Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching fa ...

随机推荐

  1. jquery on事件

    可以给后添加的动态元素绑定事件

  2. textarea 转HTML

    Text2Html(str) { if (str == null) { return ""; } else if (str.length == 0) { return " ...

  3. 2019-11-20-dotnet-Blazor-用-C#-控制界面行为

    title author date CreateTime categories dotnet Blazor 用 C# 控制界面行为 lindexi 2019-11-20 18:26:25 +0800 ...

  4. H5页面IOS中键盘弹出导致点击错位的问题

    IOS在点击输入框弹出键盘  键盘回缩 后 定位没有相应改变  还有  textarea 也会弹出键盘 $("input").blur(function() { console.l ...

  5. WebSocket 实时更新mysql数据到页面

    使用websocket的初衷是,要实时更新mysql中的报警信息到web页面显示 没怎么碰过web,代码写的是真烂,不过也算是功能实现了,放在这里也是鞭策自己,web也要多下些功夫 准备 引入依赖 & ...

  6. intellij idea 搜索

    . Ctrl+N 按名字搜索类 相当于eclipse的ctrl+shift+R,输入类名可以定位到这个类文件 就像idea在其它的搜索部分的表现一样,搜索类名也能对你所要搜索的内容多个部分进行匹配 甚 ...

  7. 如何使用jmeter调用soap协议

  8. 无旋treap hfq-treap

    怎么代码都这么长... #include<iostream> #include<stdio.h> #include<string.h> #include<al ...

  9. 新浪微博API错误代码说明对照表 http://open.weibo.com/wiki/Error_code

    http://open.weibo.com/wiki/Error_code 这篇文章资料是从新浪微博开发平台分享过来,一方面是博主自己开发过程遇到问题对错误代码的快捷查询,不用每次都得到官方找:另一方 ...

  10. JQuery---高级选择器

    一.派生选择器 例如:$('#bavBar  a') 二.孩子选择器 例如:$('body > p') 三.相邻兄弟选择器 例如:$('h2 + div') 四.属性选择器 1.$('img[a ...