x/mobile: proguard strips generated proxy classes from AAR #30251
Labels
FrozenDueToAge
mobile
Android, iOS, and x/mobile
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Build android library using gomobile (commit
a42111704963f4f0d1266674e1e97489aa8dcca0
):where the package
lndmobile
is defined as here: https://github.com/halseth/lnd/tree/mobile-support/mobileThis creates a library
Lndmobile.aar
which I import into an Android Studio project: https://github.com/lightninglabs/lightning-app/blob/expokit-32/mobile/android/app/src/main/java/host/exp/exponent/LndNativeModule.javaWhat did you expect to see?
App builds and runs, both in debug and release modes.
What did you see instead?
App works in debug mode, but in release mode (Build->Generate Signed APK) it crashes with error
Inspecting the generated APKs shows that
lndmobile.Lndmobile$proxyCallback
gets stripped from the release APK. The following patch seems to resolve it, by adding the package name to the proguard rules:Let me know if this is a desired addition, or if there is a better way to resolve this issue.
The text was updated successfully, but these errors were encountered: