Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive 覆盖最终方法等于
Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals
我是 Android 的新手,我无法将我的第一个应用程序安装到 运行。每当我尝试时,它都会抛出此错误:
Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.
我用谷歌搜索了一下,发现了很多问题。正如许多人所说,这个问题可能是由于我在我的项目中对 BouncyCastle 有多个依赖项。我尝试删除我的项目和本地文件夹中的 .gradle 文件夹,以便我可以再次从存储库下载 jar,但没有任何改变。我还仔细检查了我的 JAVA_HOME 是否已设置并且它指向 1.7 版本。我尝试 gradle :app:clean 和 gradle :app:dependencies 看看我是否遗漏了什么但仍然......我看不到 BouncyCastle 的任何依赖......任何人都可以帮助我?
另外,这个问题是在我没有更改任何代码的情况下发生的...该应用程序昨天成功运行,现在给我这个错误...我不明白。谢谢。
编辑
gradle.build
顶级:
// 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()
}
}
模块应用:
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')
}
模块排球:
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'
rules.gradle 模块截击:
apply plugin: 'com.android.library'
我自己解决了这个问题,方法是将我使用的 JDK 从 x32 更改为 x64,现在编译正确。
我是 Android 的新手,我无法将我的第一个应用程序安装到 运行。每当我尝试时,它都会抛出此错误:
Android gradle :app:packageDebug FAILED: class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.
我用谷歌搜索了一下,发现了很多问题。正如许多人所说,这个问题可能是由于我在我的项目中对 BouncyCastle 有多个依赖项。我尝试删除我的项目和本地文件夹中的 .gradle 文件夹,以便我可以再次从存储库下载 jar,但没有任何改变。我还仔细检查了我的 JAVA_HOME 是否已设置并且它指向 1.7 版本。我尝试 gradle :app:clean 和 gradle :app:dependencies 看看我是否遗漏了什么但仍然......我看不到 BouncyCastle 的任何依赖......任何人都可以帮助我?
另外,这个问题是在我没有更改任何代码的情况下发生的...该应用程序昨天成功运行,现在给我这个错误...我不明白。谢谢。
编辑
gradle.build
顶级:
// 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()
}
}
模块应用:
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')
}
模块排球:
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'
rules.gradle 模块截击:
apply plugin: 'com.android.library'
我自己解决了这个问题,方法是将我使用的 JDK 从 x32 更改为 x64,现在编译正确。