androidandroid-studionexus-5bitcoinj

Bitcoinj will not compile onto Nexus 5 with Android Studio


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.


Solution

  • 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