title: Finished with non-zero exit value 1
body: <p><strong>Problem Solved:</strong><br>
  <strong>Re-installed Java and got</strong><br>
      <em>java.lang.OutOfMemoryError: GC overhead limit exceeded</em><br>
  <strong>Added the following within the android block in gradle and it worked</strong><br>
      dexOptions {
          incremental true
          javaMaxHeapSize "4g"
      }<br>
  Thank you everyone!<br>
  <strong>----------------------------------------------------------------------------</strong></p>
  
  <p>I'm getting a java error when I try to run an app that has both facebook and paypal sdk as dependencies. It works fine when I comment the facebook sdk dependency on gradle, but I need facebook login to work for my application too. Please help.</p>
  
  <pre><code>dependencies {
  compile 'com.android.support:multidex:1.0.1'
  compile 'com.google.android.gms:play-services:8.1.0'
  compile 'com.google.android.gms:play-services-identity:8.1.0'
  compile 'com.google.android.gms:play-services-plus:8.1.0'
  compile 'com.android.support:cardview-v7:23.1.1'
  compile 'com.android.support:design:23.1.1'
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.android.support:recyclerview-v7:23.1.1'
  compile 'org.lucasr.twowayview:twowayview:0.1.4'
  compile 'com.facebook.android:facebook-android-sdk:4.8.2'
  compile files('libs/PayPalAndroidSDK-2.12.1.jar')
  compile files('libs/httpcore-4.4.3.jar')
  compile files('libs/httpclient-4.5.1.jar')
  }
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>Information:Gradle tasks [:app:assembleDebug]
  :app:preBuild UP-TO-DATE
  :app:preDebugBuild UP-TO-DATE
  :app:checkDebugManifest
  :app:preReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
  :app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
  :app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
  :app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
  :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
  :app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
  :app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
  :app:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
  :app:prepareOrgLucasrTwowayviewTwowayview014Library 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:processDebugJavaRes UP-TO-DATE
  :app:compileDebugJavaWithJavac
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  :app:compileDebugNdk UP-TO-DATE
  :app:compileDebugSources
  :app:collectDebugMultiDexComponents UP-TO-DATE
  :app:packageAllDebugClassesForMultiDex
  :app:shrinkDebugMultiDexComponents
  :app:createDebugMainDexClassList
  :app:dexDebug
  UNEXPECTED TOP-LEVEL EXCEPTION:
  java.lang.RuntimeException: Exception parsing classes
      at com.android.dx.command.dexer.Main.processClass(Main.java:752)
      at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
      at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
      at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
      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:672)
      at com.android.dx.command.dexer.Main.processAllFiles(Main.java:569)
      at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
      at com.android.dx.command.dexer.Main.run(Main.java:275)
      at com.android.dx.command.dexer.Main.main(Main.java:245)
      at com.android.dx.command.Main.main(Main.java:106)
  Caused by: 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.parseClass(Main.java:764)
      at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
      at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
      at com.android.dx.command.dexer.Main.processClass(Main.java:749)
  ... 12 more
  1 error; aborting
  Error:Execution failed for task ':app:dexDebug'.
  &gt; 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
  Information:BUILD FAILED
  Information:Total time: 39.781 secs
  Information:1 error
  Information:0 warnings
  Information:See complete output in console
  </code></pre>