赞
踩
项目中添加了butterknife依赖注入框架:compile 'com.jakewharton:butterknife:8.8.1'
项目在android系统版本7.0的手机上面可以运行,但是当更换手机系统版本为4.4时,打包安装时出现如下2个错误:
- Error:Error converting bytecode to dex:
- Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
- :app:transformClassesWithDexForDebug FAILED
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
- > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_67\bin\java.exe'' finished with non-zero exit value 2
这可能是由于butterknife中依赖的v4包引起的,将gradle中的依赖改为:
- compile ('com.jakewharton:butterknife:8.8.1'){
- exclude group: 'com.android.support'
- }
就可以了。
关于第二个错误的更多内容:https://www.aliyun.com/jiaocheng/17829.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。