LtbLightning / bdk-rn

Bitcoin Development Kit - React Native Module
MIT License
50 stars 15 forks source link

Android - Compiled app fails at creating wallet #37

Closed Czino closed 1 year ago

Czino commented 1 year ago

Leaving this here for future reference.

I found and 2 issues after compiling my android APK. They did not occur while running react-native via react-native run-android

"code": "Init Wallet Error"
"message": "Can't obtain peer field ID for class com.sun.jna.Pointer"

&

"code": "Init Wallet Error"
"message": ""

The fix for these issues is simply adding the following proguard rules in my project:

# Package: bdk-rn
-keep class com.sun.jna.** { *; }
-keep class org.bitcoindevkit.** { *; }