3

I am quite new to the studio,

I am trying to Run my application

Error is encountered -

What went wrong:

Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

I tried with jdk 1.8 which gave the same error.

So found few answers which said to reduce jdk to 1.7

but the Error still persists

Please Suggest what to do

Gradle :

apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "22.0.1" defaultConfig { applicationId "innovapptive.com.mworkorder" minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.0.0' } 
9
  • See these : stackoverflow.com/questions/28640314/… stackoverflow.com/questions/28917696/… Commented Jul 13, 2015 at 6:35
  • Enabling multidex gives me error : Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: android/support/v7/app/ActionBar$NavigationMode.class Commented Jul 13, 2015 at 7:08
  • if you're trying to use Multidex you need to provide dependency for Multidex support lib Commented Jul 13, 2015 at 7:09
  • Thanks,But how do i do that ....I am Quite new to this . Commented Jul 13, 2015 at 7:19
  • dependencies { compile 'com.android.support:multidex:1.0.0' compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.0.+' } Commented Jul 13, 2015 at 7:36

3 Answers 3

2

This is what worked for me taken from this answer:

defaultConfig { multiDexEnabled true } 
Sign up to request clarification or add additional context in comments.

Comments

2

What worked for me was: Build-> Rebuild Project

Comments

1

I fllow the first answer and then another problem caused: **Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.

java.util.zip.ZipException: duplicate entry: com/umeng/analytics/AnalyticsConfig.class** Then it happened: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: com/umeng/analytics/AnalyticsConfig.class So I tried to remove this:

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile project(':libraries:SlidingMenu') compile files('libs/volley_src.jar') compile files('libs/Volley_bin.jar') // compile 'com.umeng.analytics:analytics:latest.integration' // compile files('libs/umeng-analytics-v5.6.1.jar') compile files('libs/xUtils-2.6.14.jar') } 

It works and I don't know why,I may try the latest Umeng SDK later. It may work for you if you are using count and analysis SDK.

1 Comment

What;s more,I tried the latest SDK and it's marked as a suitable version for Android 6.0,It may be the result for the problem,I guess

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.