0

ERROR Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

my gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0 rc3"

defaultConfig {
    applicationId "com.example.sagar.shavanma"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}


dependencies {

compile fileTree(dir: 'libs', include: '*.jar')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
}

Gridle

:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportDesign2330Library UP-TO-DATE :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidVolleyVolley100Library UP-TO-DATE :app:prepareComGithubNirhartParallaxscroll10Library 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:compileDebugJavaWithJavac 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:prePackageMarkerForDebug :app:transformClassesWithJarMergingForDebug :app:collectDebugMultiDexComponents :app:transformClassesWithMultidexlistForDebug ProGuard, version 5.2.1 Reading program jar [G:\Projects\Shavanma\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar] Reading library jar [C:\Users\shree\AppData\Local\Android\sdk\build-tools\24.0.0-preview\lib\shrinkedAndroid.jar] Preparing output jar [G:\Projects\Shavanma\app\build\intermediates\multi-dex\debug\componentClasses.jar] Copying resources from program jar [G:\Projects\Shavanma\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar] :app:transformClassesWithMultidexlistForDebug FAILED Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

1 Answers1

0

try add this in your build.gradle file: under dependency

compile 'com.android.support:multidex:1.0.0'

then create a global application class for your app:

import android.support.multidex.MultiDex;
public class Global_class extends Application {

 protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
   }
}

add this class in your manifest file under application tag

 <application
    android:name="com.package_name.Global_class"
 </application>
rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62
  • If you don't need multidex, then there's no reason to add it. It also might not fix the problem – OneCricketeer May 30 '16 at 11:30
  • try deleting the app/build folder and then debug, don't add external jar files in your libs folder..clean the project and build it again. Try using stackTrace option when debug – rafsanahmad007 May 30 '16 at 12:30