Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.5.0 - Android] NoSuchFieldException on Launch #2893

Open
ekamp opened this issue Oct 2, 2024 · 1 comment
Open

[11.5.0 - Android] NoSuchFieldException on Launch #2893

ekamp opened this issue Oct 2, 2024 · 1 comment
Labels
android bug Something isn't working

Comments

@ekamp
Copy link

ekamp commented Oct 2, 2024

Describe the bug
Proguard looks to be stripping out a field needed during launch within MapRenderer causing a crash upon MapLibre init.

To Reproduce
Steps to reproduce the behavior:

  1. Integrate latest 11.5.0 version of MapLibre into an Android app using proguard
  2. Launch app / call into MapLibre.init
  3. NoSuchFieldException thrown
java.lang.NoSuchFieldError: no "J" field "nativePtr" in class "Lorg/maplibre/android/maps/renderer/MapRenderer;" or its superclasses
2024-10-02 10:37:10.420 17036-17036 System.err              pid-17036                            W  	at org.maplibre.android.net.NativeConnectivityListener.<clinit>(SourceFile:1)
2024-10-02 10:37:10.420 17036-17036 System.err              pid-17036                            W  	at org.maplibre.android.net.b.d(SourceFile:19)
2024-10-02 10:37:10.420 17036-17036 System.err              pid-17036                            W  	at org.maplibre.android.MapLibre.c(SourceFile:31)

Expected behavior
No error thrown upon init

Screenshots
N/A

Platform information (please complete the following information):

  • OS: Android 12
  • Platform Android
  • Version 11.5.0

Additional context
Nothing additional to add here, if proguard is not run everything works as expected / no issue is present

@ekamp ekamp added the bug Something isn't working label Oct 2, 2024
@ekamp
Copy link
Author

ekamp commented Oct 2, 2024

cc @louwers

@ekamp ekamp changed the title [11.5.0 - Android] NoSuchFieldException Crash on Launch [11.5.0 - Android] NoSuchFieldException on Launch Oct 2, 2024
@louwers louwers added the android label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants