Bitcoinj 将无法通过 Android Studio 编译到 Nexus 5 [英] Bitcoinj will not compile onto Nexus 5 with Android Studio

查看:29
本文介绍了Bitcoinj 将无法通过 Android Studio 编译到 Nexus 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Bitcoinj 构建一个应用程序,我正在尝试在 Nexus 5 上运行它.使用 Grade 构建 Bitcoinj 时 - 编译 'org.bitcoinj:bitcoinj-core:0.12' - 然后在手机上运行该应用程序, 我收到此错误...

I am building an app using Bitcoinj and I am trying to run it on a Nexus 5. When using grade to build Bitcoinj - compile 'org.bitcoinj:bitcoinj-core:0.12' - and subsequently running the app on the phone, I receive this error...

失败 [INSTALL_FAILED_NO_MATCHING_ABIS]"

有谁知道这是为什么,或者如何解决它?

Does anyone have any idea why this is, or how to fix it?

谢谢,

丹.

推荐答案

当尝试运行使用适用于 Nexus 5 的 BitcoinJ 库的 Android 应用程序时,使用最新的 android 版本 5.0 (Lollipop)您将收到此错误消息INSTALL_FAILED_NO_MATCHING_ABIS".主要原因是您正在尝试安装具有本机库的应用,但它没有适用于您的 CPU 架构的本机库.

When trying to run an android app that uses the BitcoinJ library for Nexus 5, with the latest android version 5.0 (Lollipop) you will get this error message "INSTALL_FAILED_NO_MATCHING_ABIS". The main reason is that you are trying to install an app that has native libraries and it doesn't have a native library for your cpu architecture.

解决问题的本机库是 Scrypt.jar,所以我排除了它

The native library that did the problem was Scrypt.jar so I excluded it

    compile('com.google:bitcoinj:0.11.3') {
    exclude module: 'scrypt'
}

而不是使用

com.lambdaworks.crypto.SCrypt;

例如使用另一个加密库,

just use another scrypting library for instance,

org.spongycastle.crypto.generators.SCrypt;

祝你好运

这篇关于Bitcoinj 将无法通过 Android Studio 编译到 Nexus 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆