build - Android: Execution failed for task ':dexDebug' -


i facing problem when change targetsdk version 21 23.

after changing , build gradle, when try run application getting error

error:execution failed task ':dexdebug'.  > com.android.ide.common.process.processexception:   org.gradle.process.internal.execexception:  process 'command 'c:\program files\java\jdk1.8.0_66\bin\java.exe'' finished non-zero exit value  

in lib folder have library called org.apache.http.legacy

this library added when change sdk version 21 23 , because in 23 depricated.

  • sync: ok
  • make project: ok
  • clean: ok
  • run: error

my gradle file is

buildscript { repositories {     mavencentral() } dependencies {      classpath 'com.android.tools.build:gradle:1.3.0' } } apply plugin: 'android'   dependencies { compile filetree(dir: 'libs', include: '*.jar') compile 'com.android.support:appcompat-v7:23.1.1' compile('com.android.support:support-v4:21.0.3') {     exclude module: 'support-v4' }  configurations {     all*.exclude group: 'com.android.support', module: 'support-v4' } compile 'com.android.support:cardview-v7:23.0.1' compile 'com.google.android.gms:play-services:7.8.0' }   android { compilesdkversion 23 buildtoolsversion "23.0.2" uselibrary 'org.apache.http.legacy'  defaultconfig {     minsdkversion 11     targetsdkversion 23  } 

in lib folder have

  • armeabi
  • armeabi-v7a
  • x86
  • android-support-v4.jar
  • gcm.jar
  • json.jar
  • org.apache.http.legacy.jar
  • tint.jar
  • webproc.jar

can please me resolve error error:execution failed task ':dexdebug'.finished non-zero exit value 2

i heard may because of jar issue. several times delete , paste new jar local\android\sdk\platforms\android-23\optional. still facing same issue

can please me

please remove v4 support library because using appcompat-v7.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -