Bitcoinj will not compile onto Nexus 5 with Android Studio

拟墨画扇 提交于 2019-12-04 01:52:34

问题


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...

"Failure [INSTALL_FAILED_NO_MATCHING_ABIS]"

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

Thanks,

Dan.


回答1:


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.

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

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

and instead of using

com.lambdaworks.crypto.SCrypt;

just use another scrypting library for instance,

org.spongycastle.crypto.generators.SCrypt;

Good Luck



来源:https://stackoverflow.com/questions/28560096/bitcoinj-will-not-compile-onto-nexus-5-with-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!