关于::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

这里写图片描述

这里写图片描述

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Executing tasks: [:app:assembleDebug] in project D:\Users\lenovo\AndroidStudioProjects\Pinduoduo WARNING: The specified Android SDK Build Tools version (27.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '27.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:checkDebugManifest UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:javaPreCompileDebug UP-TO-DATE > Task :app:mainApkListPersistenceDebug UP-TO-DATE > Task :app:generateDebugResValues UP-TO-DATE > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE > Task :app:mergeDebugShaders UP-TO-DATE > Task :app:compileDebugShaders UP-TO-DATE > Task :app:generateDebugAssets UP-TO-DATE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:compileDebugAidl NO-SOURCE > Task :app:generateDebugResources UP-TO-DATE > Task :app:mergeDebugResources UP-TO-DATE > Task :app:processDebugManifest > Task :app:processDebugResources FAILED AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"D:\\Users\\lenovo\\AndroidStudioProjects\\Pinduoduo\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":34}}],"original":"D:\\Users\\lenovo\\AndroidStudioProjects\\Pinduoduo\\app\\src\\main\\res\\layout\\activity_main.xml:35: AAPT: error: '#875ale' is incompatible with attribute textColor (attr) reference|color.\n ","tool":"AAPT"} FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed D:\Users\lenovo\AndroidStudioProjects\Pinduoduo\app\src\main\res\layout\activity_main.xml:35: AAPT: error: '#875ale' is incompatible with attribute textColor (attr) reference|color. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 3s 11 actionable tasks: 2 executed, 9 up-to-date
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Crazy丶code

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值