title: Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals
body: <p>I'm new to Android and I can't get my first app to run. Whenever I try, it's throwing this error:</p>
  
  <p><strong><code>Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.</code></strong></p>
  
  <p>I googled it and I found many questions there. As many said, this problem is probably due to the fact that I have multiple dependencies on BouncyCastle in my project. I tryed to remove the .gradle folder both in my project and in my local folder so I could download again the jars from the repository but nothing has changed. I also double checked that my JAVA_HOME is set and it's pointing to a 1.7 version. I tryed to gradle :app:clean and gradle :app:dependencies to see if I was missing something but still... I can't see any dependency from BouncyCastle... Can anybody help me? </p>
  
  <p>Also, this problem occured without me changing any code... The app successfully worked yesterday and now is giving me this error... I don't get it. Thank you.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>gradle.build</strong></p>
  
  <p><strong>Top-level:</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  repositories {
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:1.1.0'
  
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
  }
  }
  
  allprojects {
  repositories {
      jcenter()
  }
  }
  </code></pre>
  
  <p><strong>Module app:</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 21
  buildToolsVersion "21.1.2"
  
  defaultConfig {
      applicationId "com.example.aurasphere.provaactionbar"
      minSdkVersion 11
      targetSdkVersion 21
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:22.0.0'
  compile 'com.google.android.gms:play-services:7.0.0'
  compile project(':volley')
  compile files('libs/gson-2.2.2.jar')
  }
  </code></pre>
  
  <p><strong>Module volley:</strong></p>
  
  <pre><code>buildscript {
  repositories {
      mavenCentral()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.14.+'
  }
  }
  
  apply plugin: 'com.android.library'
  
  android {
  compileSdkVersion 19
  buildToolsVersion = '21.1.0'
  }
  
  apply from: 'rules.gradle'
  </code></pre>
  
  <p>rules.gradle for module volley:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  </code></pre>