Android 关于::app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE,引用jar冲突问题

错误提示: 
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:assembleDebug] 
:app:clean 
:app:preBuild UP-TO-DATE 
:app:preDebugBuild UP-TO-DATE 
:app:checkDebugManifes

。。。。。。

:FlycoTabLayout_Lib:packageReleaseRenderscript UP-TO-DATE

:FlycoTabLayout_Lib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE

:FlycoTabLayout_Lib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE 
:FlycoTabLayout_Lib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE 
:FlycoTabLayout_Lib:bundleRelease UP-TO-DATE 
:app:preReleaseBuild UP-TO-DATE 
:app:prepareCodetestFlycoTabLayout_Lib150Library

:app:generateDebugAndroidTestSources 
:app:preDebugUnitTestBuild UP-TO-DATE 
:app:prepareDebugUnitTestDependencies 
:app:mockableAndroidJar UP-TO-DATE 
:app:compileDebugJavaWithJavac 
注: 某些输入文件使用或覆盖了已过时的 API。 
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 
注: E:\codetest\app\src\main\Java\com\neipin\app\activity\EditInformationActivity.java使用了未经检查或不安全的操作。 
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 
:app:compileDebugNdk UP-TO-DATE 
:app:compileDebugSources 
:app:buildInfoDebugLoader 
:app:transformClassesWithExtractJarsForDebug

:app:generateDebugInstantRunAppInfo 
:app:transformClassesWithDexForDebug 
Allocated dexExecutorService of size 1 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.Android.support\support-v4\23.1.1\jars\libs\internal_impl-23.1.1.jar took 3347 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.1.1\jars\classes.jar took 7057 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.flyco.roundview\FlycoRoundView_Lib\1.1.2\jars\classes.jar took 431 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\jars\classes.jar took 4074 
Dexing E:\codetest\app\build\intermediates\incremental-classes\debug\classes.jar took 338 
Dexing E:\codetest\app\build\intermediates\incremental-runtime-classes\debug\instant-run.jar took 1768 
Dexing E:\codetest\app\build\intermediates\transforms\instantRun\debug\folders\1\5\main took 5800 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.bigkoo\pickerview\2.0.8\jars\classes.jar took 961 
Dexing C:\Users\zyy.gradle\caches\modules-2\files-2.1\com.jakewharton\butterknife\7.0.1\d5d13ea991eab0252e3710e5df3d6a9d4b21d461\butterknife-7.0.1.jar took 1297 
Dexing E:\SDK_JDK\android-sdk\extras\android\m2repository\com\android\support\support-annotations\23.1.1\support-annotations-23.1.1.jar took 222 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.7heaven.ioswidget\iosswitch\0.5\jars\libs\library_nineoldandroids.jar took 1969 
Dexing E:\codetest\app\build\intermediates\exploded-aar\com.7heaven.ioswidget\iosswitch\0.5\jars\classes.jar took 716 
Dexing C:\Users\zyy.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar took 2242 
Error:Error converting bytecode to dex: 
Cause: com.android.dex.DexException: Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorListener; 
: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 ‘E:\SDK_JDK\jdk\bin\java.exe” finished with non-zero exit value 2 
Information:BUILD FAILED 
Information:Total time: 48.031 secs 
Information:2 errors 
Information:0 warnings 
Information:See complete output in console

问题原因:

1.引用的github开源项目,module之间有冲突的jar(主要是v4 v7包冲突版本不同)

2.提示类似错误,可能是mainfist配置的activity,服务等信息有重复添加

3.res下的xml里有错误,复制来的布局中引用了其自定义的布局。或者引用的图片

此类问题解决办法:

1.删除冲突的引用

2.大多数问题解决办法是clean project

3.逐个检查下xml文件

4.将引用的lib 只需要将两个冲突中的一个compile改成provided就行。 
具体操作请转到 
http://blog.csdn.net/hyr83960944/article/details/41825087

时间: 2024-08-02 12:51:52

Android 关于::app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE,引用jar冲突问题的相关文章

Android 解决Execution failed for task ':app:clean.'报错

说实话,我还真是没见过比Execution failed for task ':app:clean.'更为恶心,更为不要脸的bug啦,代码没啥问题,一下子行让你爽爽,一下子又不鸟你啦,研究了下,终于找到稳定的解决方法. (1)跑到报错的那个build父目录,强制(不管你用的是啥删除软件,360还是其他的,态度一定要强硬)把build文件夹删掉. (2)网上很多都说这时候重启studio即可,当俺发现不管用,就是不管用,那就以管理员身份命令行跑去项目目录中执行一遍gradlew clean即可,这

Execution failed for task ':app:clean'.

android studio clean project 的时候报了这么一个错,不知道什么原因引起的,怎么解决? 在这里找了答案:http://stackoverflow.com/questions/32914499/error-execution-failed-for-task-appclean-unable-to-delete-file 注意文件是放在Model的gradle.build file,放在project的gradle.build file貌似一直在编译. 需要安装LockHun

Android 4.3 系统裁剪——删除不使用的app及添加自己app

删除不使用的apk 系统自带的app位置是在/android4.3/packages/apps 以下是一些APP作用分析: | |– BasicSmsReceiver | |– Bluetooth (蓝牙) | |– Browser (浏览器) | |– Calculator (计算器) | |– Calendar (日历) | |– Camera (相机) | |– CellBroadcastReceiver | |– CertInstaller (在Android中安装数字签名.被调用) |

Android 4.3 系统裁剪——删除不使用的app及增加自己app

删除不使用的apk 系统自带的app位置是在/android4.3/packages/apps 下面是一些APP作用分析: | |– BasicSmsReceiver | |– Bluetooth (蓝牙) | |– Browser (浏览器) | |– Calculator (计算器) | |– Calendar (日历) | |– Camera (相机) | |– CellBroadcastReceiver | |– CertInstaller (在Android中安装数字签名,被调用) |

Android Design 1: Back键和Up键在App导航中的表现

一,概念 1, Back键一直存在android系统中 1-1 任何页面下的返回 1-2 Floating window 1-3 Contexual Action bar/highlight select 1-4 Keyboard 2, Up键是随Android Design出来的. 2-1 android Design 定义的parent container 2-2 app的主界面是不存在Up键的 二,情景分析 1, App内部 1-1 沿逐级深入路径 Back:按照activity在栈中的顺

Android 4.1 APP中的static变量即使在APP退出后仍然不会被擦除

Android 4.1 APP中的static变量即使在APP退出后仍然会保留最后赋值状态. public class MainActivity extends Activity { private TextView tv; private static int i=10; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVie

Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.retrofit2:converter-jackson:2.1.0'Gradle没有错误,运行APP就出了这个error. 错误日志:Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.> c

Android开发5:应用程序窗口小部件App Widgets的实现

前言 本次主要是实现一个Android应用,实现静态广播.动态广播两种改变 widget内容的方法,即在上篇博文中实验的基础上进行修改,所以此次实验的重点是AppWidget小部件的实现啦~ 首先,我们简单说一下Widget是一个啥玩意~ 应用程序窗口小部件(Widget)是微小的应用程序视图,可以被嵌入到其它应用程序中(比如桌面)并接收周期性的更新.你可以通过一个App Widget provider来发布一个Widget.可以容纳其它App Widget的应用程序组件被称为App Widge

关于Android PopupWindow中实用Spinner控件点击APP Crash情况整理!

场景异常信息如下: android.view.WindowManager$BadTokenException: Unable to add window -- token [email protected] is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:646) at android.view.WindowManagerGlobal.addView(Wi