I'm going to be developing an app but when I build the default MainActivity (literally no modifications, just opened the project) in order to make sure everything is working correctly I get the following build error:
Information:Gradle tasks [clean,
:app:generateDebugSources,
:app:generateDebugAndroidTestSources,
:app:compileDebugSources,
:app:compileDebugAndroidTestSources]
:clean UP-TO-DATE
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72103Library
:app:prepareComAndroidSupportSupportV42103Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
Error:org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/cameron/Android/Sdk/build-tools/19.1.0/aapt''
:app:mergeDebugResources FAILED
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/cameron/Android/Sdk/build-tools/19.1.0/aapt''
Information:BUILD FAILED
Information:Total time: 14.079 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
I know that this is most likely a problem with having the right things installed but I'm not sure what is not installed.
Related
i find this detail in build output
3 of them they have test ignored and the other all seems okay can you help how i fix the one with test ignored
build failed
:app:compileFlutterBuildDebug
:app:preBuild
:app:preDebugBuild
:app:generateDebugBuildConfig
:app:cleanMergeDebugAssets
:app:mergeDebugShaders
test ignored :app:compileDebugShaders
:app:generateDebugAssets
:app:generateDebugResValues
:app:processDebugGoogleServices
:app:createDebugCompatibleScreenManifests
:app:extractDeepLinksDebug
:app:javaPreCompileDebug
test ignored :app:mergeDebugNativeDebugMetadata
test ignored :app:processDebugJavaRes
:app:mergeDebugJniLibFolders
:app:validateSigningDebug
:app:writeDebugAppMetadata
:app:writeDebugSigningConfigVersionsenter
I have problems with adding Lucene 6.2.0 to my Android Studio 2.1.2 project. However, adding this library to IntelliJ IDEA is not a problem. I tried copying Lucene files to my libs folder and then adding jar files listed here as libraries (Right click => Add as library). Build.gradle was looking fine:
compile files('libs/lucene-6.2.0/queryparser/lucene-queryparser-6.2.0.jar')
compile files('libs/lucene-6.2.0/demo/lucene-demo-6.2.0.jar')
compile files('libs/lucene-6.2.0/core/lucene-core-6.2.0.jar')
compile files('libs/lucene-6.2.0/analysis/common/lucene-analyzers-common-6.2.0.jar')
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library
:app:prepareComAndroidSupportAppcompatV72400Library
:app:prepareComAndroidSupportCardviewV72340Library
:app:prepareComAndroidSupportCustomtabs2340Library
:app:prepareComAndroidSupportDesign2400Library
:app:prepareComAndroidSupportRecyclerviewV72400Library
:app:prepareComAndroidSupportSupportV42400Library
:app:prepareComAndroidSupportSupportVectorDrawable2400Library
:app:prepareComFacebookAndroidFacebookAndroidSdk4150Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders
:app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: C:\Users\Tomek\AndroidStudioProjects\UniversalSoundboard\app\src\main\java\com\tomaszstankowski\universalsoundboard\adapters\SoundListAdapter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\Tomek\AndroidStudioProjects\UniversalSoundboard\app\src\main\java\com\tomaszstankowski\universalsoundboard\custom\singletons\SoundBank.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:buildInfoDebugLoader
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
:app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug
:app:incrementalDebugTasks
:app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor
:app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
Error:PARSE ERROR:
Error:unsupported class file version 52.0
Error:...while parsing org/apache/lucene/analysis/ar/ArabicAnalyzer.class
Error:1 error; aborting
:app:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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.8.0_73\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 40.184 secs
Information:5 errors
Information:0 warnings
Information:See complete output in console
Tried adding these libraries as Dependencies from Maven Central but the result was the same as above.
Error:unsupported class file version 52.0
Error:...while parsing org/apache/lucene/analysis/ar/ArabicAnalyzer.class
I also tried this way:
compile fileTree(dir: 'libs', include: '*.jar')
My app ran without any errors but Lucene classes were not recognized.
What I'm doing wrong?
Problem seems to be solved now.
Error:unsupported class file version 52.0
Means that library was written in Java 8 (version 52.0) and android API still doesn't support Java 8 strongly enough to use such libraries even if you have selected JDK 1.8+ in your Android Studio project settings. Correct me if I'm wrong.
I have just set up a new computer with Android Studio and imported my project from bitbucket.
Problem is that I am now getting this error when trying to build the project:
Information:Gradle tasks [:app:clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies, :app:assembleDebug] :app:clean
:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE
:app:prepareChAcraAcra470Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library
:app:prepareComAndroidSupportAppcompatV72420Library
:app:prepareComAndroidSupportDesign2420Library
:app:prepareComAndroidSupportRecyclerviewV72420Library
:app:prepareComAndroidSupportSupportCompat2420Library
:app:prepareComAndroidSupportSupportCoreUi2420Library
:app:prepareComAndroidSupportSupportCoreUtils2420Library
:app:prepareComAndroidSupportSupportFragment2420Library
:app:prepareComAndroidSupportSupportMediaCompat2420Library
:app:prepareComAndroidSupportSupportV132420Library
:app:prepareComAndroidSupportSupportV42420Library
:app:prepareComAndroidSupportSupportVectorDrawable2420Library
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library
:app:prepareComGoogleAndroidGmsPlayServicesVision940Library
:app:prepareComJourneyappsZxingAndroidEmbedded320Library
:app:prepareDebugDependencies :app:compileDebugAidl
:app:compileDebugRenderscript :app:generateDebugBuildConfig
:app:mergeDebugShaders :app:compileDebugShaders
:app:generateDebugAssets :app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
:app:mergeDebugResources :app:processDebugManifest
:app:processDebugResources :app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources :app:mockableAndroidJar
UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not
incremental (e.g. outputs have changed, no previous execution, etc.).
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. :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:buildInfoDebugLoader
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
UP-TO-DATE :app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE
:app:incrementalDebugTasks :app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug Error:Uncaught translation error:
com.android.dx.cf.code.SimException: local 0001: invalid Error:1
error; aborting Error:Execution failed for task
':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Return code 1 for dex
process Information:BUILD FAILED Information:Total time: 1 mins 38.347
secs Information:3 errors Information:0 warnings Information:See
complete output in console
And here is the output from the Gradle Console window:
Executing tasks: [:app:clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies, :app:assembleDebug]
Configuration on demand is an incubating feature. Incremental java
compilation is an incubating feature. :app:clean :app:preBuild
UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE :app:prepareChAcraAcra470Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library
:app:prepareComAndroidSupportAppcompatV72420Library
:app:prepareComAndroidSupportDesign2420Library
:app:prepareComAndroidSupportRecyclerviewV72420Library
:app:prepareComAndroidSupportSupportCompat2420Library
:app:prepareComAndroidSupportSupportCoreUi2420Library
:app:prepareComAndroidSupportSupportCoreUtils2420Library
:app:prepareComAndroidSupportSupportFragment2420Library
:app:prepareComAndroidSupportSupportMediaCompat2420Library
:app:prepareComAndroidSupportSupportV132420Library
:app:prepareComAndroidSupportSupportV42420Library
:app:prepareComAndroidSupportSupportVectorDrawable2420Library
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library
:app:prepareComGoogleAndroidGmsPlayServicesVision940Library
:app:prepareComJourneyappsZxingAndroidEmbedded320Library
:app:prepareDebugDependencies :app:compileDebugAidl
:app:compileDebugRenderscript :app:generateDebugBuildConfig
:app:mergeDebugShaders :app:compileDebugShaders
:app:generateDebugAssets :app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
:app:mergeDebugResources :app:processDebugManifest
:app:processDebugResources :app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources :app:mockableAndroidJar
UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not
incremental (e.g. outputs have changed, no previous execution, etc.).
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.
:app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
:app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
UP-TO-DATE :app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE
:app:incrementalDebugTasks :app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug AGPBI:
{"kind":"error","text":"Uncaught translation error:
com.android.dx.cf.code.SimException: local 0001:
invalid","sources":[{}]} AGPBI: {"kind":"error","text":"1 error;
aborting","sources":[{}]}
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Return code 1 for dex
process
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
To investigate, I have created the Camera2Basic sample project that comes with Android Studio and that builds fine, so maybe this is a problem with a setting within my project rather than a general configuration/setup problem?
What I've already tried (with no luck):
Added org.gradle.jvmargs=-Xmx2048m to my gradle.properties file.
Setting minifyEnabled false in my app build.gradle file (in the release and in the debug blocks).
This suggestion.
File > Invalidate Cahces / Restart...
NB - Similar question here - but with a different error number and, currently, no answers.
Update:
Having removed a third party library (nxpnfclib.jar) from my app, my project now builds and runs fine. But if I then try re-adding the jar, the problem comes back.
Update #2:
I have created one of the sample Android Studio projects (Camera2Basic) and added the nxpnfclib.jar library. The same problem occurs. So this is clearly a problem with the nxpnfclib.jar library. (I have, today, emailed NXP about this latest issue with their library, so I will update this page with their solution - unless they update it, of course.)
I am using:
Windows 7 (64-bit)
Android Studio v2.1.3 (as a fresh install)
JDK 1.8.0_102
Gradle version 2.14.1
Android plugin version 2.1.3
This what I did to fix in my scenario:
At the project level on android studio updated the build.gradle like this:
buildscript {
ext.kotlin_version = '1.2.31
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
Then on the gradle-wrapper.properties this:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
I use the android studio import lib, appeared the following error,IOS_Dialog_Library is ProjectName,Messages Gradle Build:
Information:Gradle tasks [:IOS_Dialog_Library:generateDebugSources,
:IOS_Dialog_Library:generateDebugAndroidTestSources,
:app:generateDebugSources, :app:generateDebugAndroidTestSources]
:IOS_Dialog_Library:preBuild UP-TO-DATE
:IOS_Dialog_Library:preDebugBuild UP-TO-DATE
:IOS_Dialog_Library:checkDebugManifest
:IOS_Dialog_Library:prepareDebugDependencies
:IOS_Dialog_Library:compileDebugAidl UP-TO-DATE
:IOS_Dialog_Library:compileDebugRenderscript UP-TO-DATE
:IOS_Dialog_Library:generateDebugBuildConfig UP-TO-DATE
:IOS_Dialog_Library:generateDebugAssets UP-TO-DATE
:IOS_Dialog_Library:mergeDebugAssets UP-TO-DATE
:IOS_Dialog_Library:generateDebugResValues UP-TO-DATE
:IOS_Dialog_Library:generateDebugResources UP-TO-DATE
:IOS_Dialog_Library:packageDebugResources UP-TO-DATE
:IOS_Dialog_Library:processDebugManifest UP-TO-DATE
:IOS_Dialog_Library:processDebugResources UP-TO-DATE
:IOS_Dialog_Library:generateDebugSources UP-TO-DATE
:IOS_Dialog_Library:preDebugAndroidTestBuild UP-TO-DATE
:IOS_Dialog_Library:prepareDebugAndroidTestDependencies
:IOS_Dialog_Library:compileDebugAndroidTestAidl UP-TO-DATE
:IOS_Dialog_Library:compileDebugNdk UP-TO-DATE
:IOS_Dialog_Library:compileLint :IOS_Dialog_Library:copyDebugLint
UP-TO-DATE :IOS_Dialog_Library:mergeDebugProguardFiles UP-TO-DATE
:IOS_Dialog_Library:packageDebugRenderscript UP-TO-DATE
:IOS_Dialog_Library:compileDebugJavaWithJavac UP-TO-DATE
:IOS_Dialog_Library:processDebugJavaRes UP-TO-DATE
:IOS_Dialog_Library:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:IOS_Dialog_Library:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE :IOS_Dialog_Library:mergeDebugJniLibFolders UP-TO-DATE
:IOS_Dialog_Library:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:IOS_Dialog_Library:transformNative_libsWithSyncJniLibsForDebug
UP-TO-DATE :IOS_Dialog_Library:bundleDebug UP-TO-DATE
:IOS_Dialog_Library:compileDebugSources UP-TO-DATE
:IOS_Dialog_Library:assembleDebug UP-TO-DATE
:IOS_Dialog_Library:processDebugAndroidTestManifest UP-TO-DATE
:IOS_Dialog_Library:compileDebugAndroidTestRenderscript UP-TO-DATE
:IOS_Dialog_Library:generateDebugAndroidTestBuildConfig UP-TO-DATE
:IOS_Dialog_Library:generateDebugAndroidTestAssets UP-TO-DATE
:IOS_Dialog_Library:mergeDebugAndroidTestAssets UP-TO-DATE
:IOS_Dialog_Library:generateDebugAndroidTestResValues UP-TO-DATE
:IOS_Dialog_Library:generateDebugAndroidTestResources UP-TO-DATE
:IOS_Dialog_Library:mergeDebugAndroidTestResources AAPT err(Facade for
98288211): libpng error: Not a PNG file Error:Execution failed for
task ':IOS_Dialog_Library:mergeDebugAndroidTestResources'.
Some file crunching failed, see logs for details Information:BUILD FAILED Information:Total time: 1.462 secs Information:1 error
Information:0 warnings Information:See complete output in console
I got a lot of places did not find this problem, need your help, thank you
From bug, here it is said that this can happen when using the Gradle Tools v1.1.0. After updating to v1.1.3, this has not happened anymore
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
}