Can anyone please help me with this? I dont know what does this mean. To give you a back up I updated my sdk with 23 and then i got 101 errors regarding HTTPClient not being resolved.
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72310Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42310Library 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 UP-TO-DATE
: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\Akula\AppData\Local\Android\sdk\build-tools\23.0.1\dx.bat --dex --no-optimize --output D:\NewAndroidstudioworkspace\ToReachMe\app\build\intermediates\dex\debug --input-list=D:\NewAndroidstudioworkspace\ToReachMe\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/apache/http/ConnectionClosedException;
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:502)
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)
Information:BUILD FAILED
Information:Total time: 9.118 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
add code in gradle:
defaultConfig {
..
..
multiDexEnabled true
}
Related
this is a common error, but in this case don't know how to solve this. What I do:
cordova build android
And it return this:
$ cordova build android
Running command: "/app/platforms/android/cordova/build"
ANDROID_HOME=/Android SDK/adt-bundle-mac-x86_64-20140702/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
Running: /app/platforms/android/gradlew cdvBuildDebug -b /app/platforms/android/build.gradle -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:compileLint
:com.phonegap.plugins.facebookconnect:FacebookLib:copyDebugLint UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugProguardFiles UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:preBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:preDebugBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:checkDebugManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:preDebugTestBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareAndroidCordovaLibUnspecifiedDebugLibrary
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareDebugDependencies
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugAidl
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugRenderscript
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugBuildConfig
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugAssets UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugAssets
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugResValues UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:generateDebugSources
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:com.phonegap.plugins.facebookconnect:FacebookLib:processDebugJavaRes UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugJar
:com.phonegap.plugins.facebookconnect:FacebookLib:compileDebugNdk
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugJniLibs UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugLocalJar
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugRenderscript UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageDebugResources
:com.phonegap.plugins.facebookconnect:FacebookLib:bundleDebug
:prepareAndroidComPhonegapPluginsFacebookconnectFacebookLibUnspecifiedDebugLibrary
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:preReleaseBuild
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:preReleaseBuild
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJava UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:packageReleaseJar UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:packageReleaseJniLibs UP-TO-DATE
:CordovaLib:packageReleaseLocalJar UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:copyReleaseLint UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeReleaseProguardFiles UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:preReleaseBuild
:com.phonegap.plugins.facebookconnect:FacebookLib:checkReleaseManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareAndroidCordovaLibUnspecifiedReleaseLibrary
:com.phonegap.plugins.facebookconnect:FacebookLib:prepareReleaseDependencies
:com.phonegap.plugins.facebookconnect:FacebookLib:compileReleaseAidl
:com.phonegap.plugins.facebookconnect:FacebookLib:compileReleaseRenderscript
:com.phonegap.plugins.facebookconnect:FacebookLib:generateReleaseBuildConfig
:com.phonegap.plugins.facebookconnect:FacebookLib:generateReleaseAssets UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeReleaseAssets
:com.phonegap.plugins.facebookconnect:FacebookLib:generateReleaseResValues UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:generateReleaseResources
:com.phonegap.plugins.facebookconnect:FacebookLib:mergeReleaseResources
:com.phonegap.plugins.facebookconnect:FacebookLib:processReleaseManifest
:com.phonegap.plugins.facebookconnect:FacebookLib:processReleaseResources
:com.phonegap.plugins.facebookconnect:FacebookLib:generateReleaseSources
:com.phonegap.plugins.facebookconnect:FacebookLib:compileReleaseJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:com.phonegap.plugins.facebookconnect:FacebookLib:processReleaseJavaRes UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageReleaseJar
:com.phonegap.plugins.facebookconnect:FacebookLib:compileReleaseNdk
:com.phonegap.plugins.facebookconnect:FacebookLib:packageReleaseJniLibs UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageReleaseLocalJar
:com.phonegap.plugins.facebookconnect:FacebookLib:packageReleaseRenderscript UP-TO-DATE
:com.phonegap.plugins.facebookconnect:FacebookLib:packageReleaseResources
:com.phonegap.plugins.facebookconnect:FacebookLib:bundleRelease
:prepareComAndroidSupportSupportV42220Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:preDexDebug
:dexDebug
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:502)
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)
:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Android SDK/adt-bundle-mac-x86_64-20140702/sdk/build-tools/23.0.1/dx --dex --no-optimize --output /app/platforms/android/build/intermediates/dex/debug --input-list=/app/platforms/android/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:502)
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)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 30.368 secs
/app/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /app/platforms/android/gradlew with args: cdvBuildDebug,-b,/app/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /app/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /app/platforms/android/cordova/build: Command failed with exit code 1
So I understand that is a conflict of versions between android-support-v4 and android-support-v13 but don't know how to solve this.
$ cordova -v
5.4.0
$ cordova platform
Installed platforms: android 4.1.1, ios 3.8.0
Thanks in advance!
I will bet that it's the Facebook plugin that's causing the collision. Try adding this to your platforms/android/build.gradle file:
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
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
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...
I have downloaded and added xstream-1.4.8.jar to my Android Studio project. When I build the project it works fine but when I try to run it I get the following error from the Gradle Build window:
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
: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 UP-TO-DATE
:app:preDexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
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)
...while parsing com/thoughtworks/xstream/mapper/LambdaMapper.class
1 error; aborting
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 14.974 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
I have looked at the related answers on here and none of the suggested solutions work for me.
Thanks in advance.
XStream 1.4.8 is compiled for Java 8 and the latest version Android supports is Java 7.
One solution is to use XStream 1.4.7, that works with Android, and another to download XStream 1.4.8 sources and compile them yourself. In that case you will have to remove LambdaMapper.java and possibly some other problematic classes.
Also you can have issues with different versions of xmlpull parser used. In that case you can exclude one from compiling.
compile('com.thoughtworks.xstream:xstream:1.4.7') {
exclude group: 'xmlpull', module: 'xmlpull'
}
I have one problem.When I run my app,I got This error,But build successfully.I know that there are lib conflict error may be.I followed many URLs one of them is http://www.thedevline.com/search/label/Android%20development
But I did not get what is problem.Error is
Information:Gradle tasks [:assembleDebug]
:preBuild
:compileDebugNdk
:preDebugBuild
:checkDebugManifest
:preReleaseBuild
:facebook:compileLint
:facebook:copyReleaseLint UP-TO-DATE
:facebook:preBuild
:facebook:preReleaseBuild
:facebook:checkReleaseManifest
:facebook:preDebugBuild
:facebook:preDebugTestBuild
:facebook:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:facebook:prepareReleaseDependencies
:facebook:compileReleaseAidl UP-TO-DATE
:facebook:compileReleaseRenderscript UP-TO-DATE
:facebook:generateReleaseBuildConfig UP-TO-DATE
:facebook:generateReleaseAssets UP-TO-DATE
:facebook:mergeReleaseAssets UP-TO-DATE
:facebook:generateReleaseResValues UP-TO-DATE
:facebook:generateReleaseResources UP-TO-DATE
:facebook:mergeReleaseResources UP-TO-DATE
:facebook:processReleaseManifest UP-TO-DATE
:facebook:processReleaseResources UP-TO-DATE
:facebook:generateReleaseSources UP-TO-DATE
:facebook:compileReleaseJava UP-TO-DATE
:facebook:extractReleaseAnnotations UP-TO-DATE
:facebook:mergeReleaseProguardFiles UP-TO-DATE
:facebook:processReleaseJavaRes UP-TO-DATE
:facebook:packageReleaseJar UP-TO-DATE
:facebook:compileReleaseNdk UP-TO-DATE
:facebook:packageReleaseJniLibs UP-TO-DATE
:facebook:packageReleaseLocalJar UP-TO-DATE
:facebook:packageReleaseRenderscript UP-TO-DATE
:facebook:packageReleaseResources UP-TO-DATE
:facebook:bundleRelease UP-TO-DATE
:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:prepareComFacebookAndroidFacebook3211Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServices6587Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:preDexDebug
:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/manu-005/Android_Setups/adt-bundle-linux-x86_64-20140702/sdk/build-tools/android-4.4W/dx --dex --no-optimize --output /home/manu-005/workspace/AppName/build/intermediates/dex/debug /home/manu-005/workspace/AppName/build/intermediates/classes/debug /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/support-annotations-21.0.3-49ca8e8cfc94918d7386df6065be15226206f457.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/bolts-android-1.1.4-61545c8defb142f83369be67bcebfa1f7690985c.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/MobileAppTracker-3.3.3-ca9457cd9ec6680ec9d845d2fc19efec4582c397.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/internal_impl-21.0.3-e77489df911cb5896aab6b91a4d4b9a838794c56.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/crittercism_v5_0_3_sdkonly-e644ef988027d1838362de88be35bbf0b876caf6.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/MobileAppTracker-javadoc-3.3.3-1641c6311e6f070ecd4d1320f44b1ba50b75dd0c.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-001b548439aeb2e89d0d4f68cd7c4e4e33d1588c.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/android-support-v4-cc1887d592a4c530b10eb1125f7e630a900240bc.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-34d67503c62f0f63b1f57f2f61a56c8d3b95a06e.jar /home/manu-005/workspace/AppName/build/intermediates/pre-dexed/debug/classes-f79c881d5c91c7786b3cf2ab1a07ece9788351e8.jar
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
Information:BUILD FAILED
Information:Total time: 3 mins 39.856 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
I tried many times but I am not able to resolve this error .Please help me.
Thanks in advance
The issue is this:
EXCEPTION: com.android.dex.DexException: Multiple dex files define
Landroid/support/annotation/AnimRes; at
This occurs when you have multiple copies of the same class in your build, which means you have 2+ versions of the same android support library specified in your project.
Even the "Studio Android 0.8.x" I could reference an external library project as a module of my project.
In settings.gradle file:
include ':app'
// sinapse library
include ':SinapseLibrary2.1'
project(':SinapseLibrary2.1').projectDir = new File('/Users/douglas/AndroidStudioProjects/SinapseLibrary2.1/library')
After the 0.9.x version that is not possible. When I run the app I get the message below.
I use the same project library within several other projects.
This is a bug, or is there an alternative?
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:SinapseLibrary2.1:compileLint
:SinapseLibrary2.1:copyReleaseLint UP-TO-DATE
:SinapseLibrary2.1:mergeReleaseProguardFiles UP-TO-DATE
:SinapseLibrary2.1:preBuild
:SinapseLibrary2.1:preReleaseBuild
:SinapseLibrary2.1:checkReleaseManifest
:SinapseLibrary2.1:prepareReleaseDependencies
:SinapseLibrary2.1:compileReleaseAidl UP-TO-DATE
:SinapseLibrary2.1:compileReleaseRenderscript UP-TO-DATE
:SinapseLibrary2.1:generateReleaseBuildConfig UP-TO-DATE
:SinapseLibrary2.1:generateReleaseAssets UP-TO-DATE
:SinapseLibrary2.1:mergeReleaseAssets UP-TO-DATE
:SinapseLibrary2.1:generateReleaseResValues UP-TO-DATE
:SinapseLibrary2.1:generateReleaseResources UP-TO-DATE
:SinapseLibrary2.1:packageReleaseResources UP-TO-DATE
:SinapseLibrary2.1:processReleaseManifest UP-TO-DATE
:SinapseLibrary2.1:processReleaseResources UP-TO-DATE
:SinapseLibrary2.1:generateReleaseSources UP-TO-DATE
:SinapseLibrary2.1:compileReleaseJava UP-TO-DATE
:SinapseLibrary2.1:processReleaseJavaRes UP-TO-DATE
:SinapseLibrary2.1:packageReleaseJar UP-TO-DATE
:SinapseLibrary2.1:compileReleaseNdk UP-TO-DATE
:SinapseLibrary2.1:packageReleaseJniLibs UP-TO-DATE
:SinapseLibrary2.1:packageReleaseLocalJar UP-TO-DATE
:SinapseLibrary2.1:packageReleaseRenderscript UP-TO-DATE
:SinapseLibrary2.1:bundleRelease UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareCromoledRemoteControlSinapseLibrary21UnspecifiedLibrary 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 UP-TO-DATE
:app:preDexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
...while parsing br/ind/sinapse/library/BuildConfig.class
1 error; aborting
Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/douglas/ferramentas/adt-bundle-mac-x86_64-20140702/build-tools/21.1.2/dx --dex --output /Users/douglas/AndroidStudioProjects/CromoledRemoteControl/app/build/intermediates/pre-dexed/debug/classes-b4d0e7e6eb67c94397ec32d2b0a00147807d74d7.jar /Users/douglas/AndroidStudioProjects/CromoledRemoteControl/app/build/intermediates/exploded-aar/CromoledRemoteControl/SinapseLibrary2.1/unspecified/classes.jar
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
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)
...while parsing br/ind/sinapse/library/BuildConfig.class
1 error; aborting
Information:BUILD FAILED
Information:Total time: 2.351 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
It is not so sure but I have experienced a similar error message as "local path doesn't exist".
My problem was solved by executing "Sync Project with Gradle Files" with the button on the Toolbar.
thank you for your attention. Finally solved the problem, but I could not understand what was the cause.
I undid the project changes that were using the version of "Android 0.8.x Studio" and then imported again in the "Android Studio 1.0.1". Updated the proguard parameters, etc.
Now it's all right. Thank you.