-
Notifications
You must be signed in to change notification settings - Fork 511
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
PlatformException with new release #167
Comments
I am getting java.lang.UnsatisfiedLinkError: No implementation found for void com.mapbox.mapboxsdk.net on the 0.0.5 version
|
Ok. My case was that I used AVD simulator with Android 9. For Android 8.1 it works properly. |
I observed this to be happening when I made hot-restart. I used physical device
|
These seem to be different issues to me. The issue @kleeb is encountering might be the same that is described upstream here and here. When you encountered the issue, how did you build the apk? @adar2378 and @fayaz07: did you encounter these issues repeatedly or only once? |
@m0nac0 it happens everytime I made hot-restart and along with it, map goes blank after hot-restart |
@fayaz07 Okay, could you please tell us exactly which version and channel of flutter you are running, which Android OS and whether you are on a emulator or a physical device? And I assume you are using version 0.0.5 of the plugin from pub.dev, is that correct? @adar2378 Did you try doing a full restart of the app (not a hot restart) after adding the plugin? The reason I'm asking is because I think I have encountered a similar issue where flutter's hot restart couldn't handle new plugins with platform views. |
@m0nac0 I was running on beta channel maybe version 1.12.5, I tried switching to stable channel even there was same issue Current version |
Thank you @fayaz07, I found this issue at flutter, which describes the same problem occurring also with other plugins using platform views. It also has more information. So I guess there's unfortunately not much we can do about this, but you could comment at that issue to let the flutter team know that the problem also occurs with mapbox_gl. |
I'm getting the same error just trying to run a fresh checkout of the example code. I'm using a physical device, my up-to-date Pixel 3a. In particular, I'm getting I first got it with:
I then upgraded and got it with this:
Either way, I do |
@wpietri thank you for the report, there are some similar issues reported upstream at flutter suggesting this might have to do with the new Android plugin APIs and the generated MainActivity.java being faulty. (see e.g. flutter/flutter#47921 (comment)) |
Gladly, @m0nac0. ./android/app/src/main/java/com/mapbox/mapboxglexample/MainActivity.java
I'll also figure out how to downgrade my Android tools and see what changes. |
Sorry, that apparently wasn't a generated MainActivity.java, but part of the example code. That's the only MainActivity.java file under the example directory, though. Anyhow, downgrading to this makes the example work for me:
|
In case it's helpful, now that I am trying out this library in my existing app, I too am seeing the UnsatisfiedLinkError when running in the emulator (API 28), but it works properly when running on my actual phone (Pixel 3a). I'm glad to debug further. |
@wpietri Thank you for the MainActivity, it looks fine. I honestly don't have any idea what might be causing this issue. For now I'd suggest we just watch the similar issues at flutter (flutter/flutter#48927, flutter/flutter#47921) and hope they can resolve this, unless someone else has an idea. |
Reverting the pubspec.yaml to |
Update pubspec.yaml in accordance with https://flutter.dev/docs/development/packages-and-plugins/developing-packages Might also fix #167
@maximumbuster Great find! I changed pubspec.yaml because this is the new way to specify supported platforms according to https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms |
@m0nac0 ahh yup, upgrading flutter to |
@maximumbuster That's great news, sorry for the inconvenience ;) |
Hey, I was on vacation. Sure I'll reopen if needs. As far as I remember I could not run the 0.0.5 version on Flutter 1.9.1.hofix6. Gotta check again and I'll let you know asap! |
I'm facing the same issue. My reference is mapbox_gl: My flutter version is 1.14.3 error: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.example.mapa_offline_mapbox/lib-main/libmapbox-gl.so" has unexpected e_machine: 40 (EM_ARM) Any clue? :( |
@raphaaugustosilva Thank you for the report, could you tell us what hardware you are running the app on (especially the ABI), how you build the APK and have you tried using the latest stable release of flutter? |
Yes, sure! I'm running into an Android Emulator x86 Nexus 5X API Level 28. |
@raphaaugustosilva try downgrading API level to 27 |
@raphaaugustosilva Also could you try running |
@m0nac0 it worked when I generate the apk without the "fat way" and without changing the API level to 27 :) |
@raphaaugustosilva Glad you were able to resolve the issue! |
@m0nac0 thanks! |
@raphaaugustosilva Do you also encounter this issue when you debug the app? |
@m0nac0 yes, sorry to don't clarify earlier. It |
Update pubspec.yaml in accordance with https://flutter.dev/docs/development/packages-and-plugins/developing-packages Might also fix flutter-mapbox-gl#167
Unhandled Exception: PlatformException(unregistered_view_type, trying to create a view with an unregistered type, unregistered view type: 'plugins.flutter.io/mapbox_gl')
The text was updated successfully, but these errors were encountered: