Mac OS X上的Android Studio,Gradle抱怨org.bouncycastle.asn1.ASN1Primitive

时间:2016-01-31 17:31:30

标签: android android-studio gradle bouncycastle

最近从Eclipse ADT迁移(或者仍在尝试)到Android Studio,这就是Gradle在我点击“运行”时所说的内容。 (以下全文):

* What went wrong:
Execution failed for task ':app:packageDebug'.
> class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z

我已经看到:Android Studio Bouncy castle issue (newbie)Problems launching error in Android Studio when packageDebug at Max OS X和类似的SO帖子都指向应该从类路径中删除的充气城堡JAR(bcprov-jdk15on-1.48.jar)。但是我没有这样的JAR文件,事实上,Gradle本身似乎下载了它,因为我发现它的唯一地方是:

/Applications/Android Studio.app/Contents/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/

试图删除那里的文件,Gradle抱怨缺少引用的库。

我该如何解决这个问题?

完整追踪:

Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library 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 UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithJarMergingForDebug UP-TO-DATE
:app:collectDebugMultiDexComponents
:app:transformClassesWithMultidexlistForDebug UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.479 secs

0 个答案:

没有答案