0

Message Gradle Build

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava
Note: C:\Users\Jhun-PC\AndroidStudioProjects\SFELAPCO\app\src\main\java\com\example\jhun_pc\sfelapco\Transfer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
  C:\Users\Jhun-PC\AppData\Local\Android\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\Jhun-PC\AndroidStudioProjects\SFELAPCO\app\build\intermediates\dex\debug --input-list=C:\Users\Jhun-PC\AndroidStudioProjects\SFELAPCO\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
  2
Output:
  UNEXPECTED TOP-LEVEL EXCEPTION:
  com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
Information:BUILD FAILED
Information:Total time: 2 mins 28.956 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
eebbesen
  • 5,070
  • 8
  • 48
  • 70

1 Answers1

0

Looks like you are using dependencies from two different version of support library, making Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs available in both libraries, which generates conflict on build.

It's better to check your dependency graph. Open Terminal from studio,and cd to your app module and run this command ..\gradlew -q dependencies. It will list all dependencies with parent dependencies, chances are high that you will find your conflicting Support Library there.

In Case of any confusion, update your question with your dependency graph. And beware of your jar files from your libs directory. I fear it may be skipped by dependency graph...

Prasham
  • 6,646
  • 8
  • 38
  • 55