2

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 Answers1

7

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

Firass Obaid
  • 349
  • 2
  • 3
  • Can you please elaborate on "use `org.spongycastle.crypto.generators.SCrypt`". My problem is that all the `bitcoinj` related files containing `com.lambdaworks.crypto.SCrypt` are locked in Android Studio and I can't change them. – src091 Jun 11 '15 at 16:05
  • 1
    @Anton you cannot change compiled files/libraries using android studio (unless you use NDK to re-compile) AFAIK. Another solution is to rewrite specific files that uses _lambdaworks.crypto.SCrypt_ and just replace the import to _org.spongycastle.crypto.generators.SCrypt_. – Firass Obaid Jun 14 '15 at 13:22