cordova build android get Execution failed for task ':dexArmv7Debug'
本篇文章由:http://xinpure.com/cordova-build-android-get-execution-failed-for-task-dexarmv7debug/
Build 过程及错误原因
Cordova
项目原本是可以正常的 build
,在添加了 XGPush
之后就出错了。。。
Input:
cordova build android
Output:
:dexArmv7Debug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
:dexArmv7Debug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dexArmv7Debug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/xinpure/android-sdk/build-tools/23.0.2/dx --dex --no-optimize --output /Project/gacha-app-hybrid/platforms/android/build/intermediates/dex/armv7/debug --input-list=/Project/gacha-app-hybrid/platforms/android/build/intermediates/tmp/dex/armv7/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
错误解决方法
添加 XGPush
之后,会在 android/libs
目录下添加一个 android-support-v4.jar
, 将此 jar 文件删除即可。
参考链接
https://github.com/phonegap/phonegap-plugin-push/issues/159
cordova build android get Execution failed for task ':dexArmv7Debug'的更多相关文章
- Android Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency
错误内容: Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency ...
- Android 解决Execution failed for task ':app:clean.'报错
说实话,我还真是没见过比Execution failed for task ':app:clean.'更为恶心,更为不要脸的bug啦,代码没啥问题,一下子行让你爽爽,一下子又不鸟你啦,研究了下,终于找 ...
- Android Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
使用Android Studio来进行图片背景设置,编译时发生了一个mergeDebugResources异常. 异常原因 这个异常的意思是对资源合并发生错误,那就是我使用的图片资源有问题,我使用的图 ...
- ionic cordova build android error: commamd failed with exit code eacces
问题: 电脑的gradle版本为Gradle 5.0,然而 因为 添加的android 平台为6.3.0 gradle 是 4.1版本 电脑已存在 gradle的情况下,add platform 成功 ...
- Android Error:Execution failed for task ':app:compileDebugJavaWithJavac' 解决方案
今天使用 Android Studio 构建项目的时候出现了这个错误 compileDebugJavaWithJavac 通过搜索发现造成该问题的原因有很多需要结合具体的项目进行排查 通过 Andro ...
- Android Studio 中 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileDebugAidl'.的问题解答
Android Studio 中 FAILURE: Build failed with an exception. * What went wrong: Execution failed for ta ...
- 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 ...
- ionic 打包 报错Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
在platform --> android目录下找到build.gradle文件,打开并在def promptForReleaseKeyPassword() {...}函数前加入以下内容: 完整 ...
- Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...
随机推荐
- 人脸对齐SDM原理----Supervised Descent Method and its Applications to Face Alignment
最近组里研究了SDM算法在人脸对齐中的应用,是CMU的论文<Supervised Descent Method and its Applications to Face Alignment> ...
- Two PWM outputs from MCU combine to form a monotonic 16-bits DAC
http://www.edn.com/design/analog/4329365/Combine-two-8-bit-outputs-to-make-one-16-bit-DAC
- linux 升级系统内核linux-4.10版本
http://blog.csdn.net/steven_liwen/article/details/68487241
- SQLiteOpenHelper 操作不成功
SDK和ADT为22.6.2版本号 project为4.4.2 今天在练习SQLiteOpenHelper里,使用的是三个JAVA文件操作.DatabaseHelper.java,Const.java ...
- Python可执行对象——exec、eval、compile
Python提供的调用可执行对象的内建函数进行说明,涉及exec.eval.compile三个函数.exec语句用来执行存储在代码对象.字符串.文件中的Python语句,eval语句用来 ...
- Fiddler2 抓取手机APP数据包
原文:http://blog.goyiyo.com/archives/2044 下载安装运行后,查出运行机器的IP,手机连接同一网域内的WIFI,手机WIFI连接设置里的高级里,代理设置填写上Fidd ...
- .net开发Ae释放com对象的问题
本文转载自: http://www.cnblogs.com/yhlx125/archive/2011/11/22/2258543.html#2269154我的博文 http://www.cnblogs ...
- Message Box Position
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- IDE的文件和代码模板
设置IDE的的模板,可以在创建文件的时候,自动产生模板内容,模板里可以 模板头设置: # -*- coding: utf- -*- """ --------------- ...
- iOS:切换视图时,反向传递数据方法二:代理
代理: 1.发送信息的控制器设置一个代理,并自定义一个代理的方法,用来传递数据 2.接受信息的控制器遵循发送信息的控制器的协议 3.接受信息的控制器设置发送信息的控制器的代理为自己self 4.接受信 ...