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

Crashing on Android #12

Open
JCKodel opened this issue Oct 26, 2022 · 1 comment
Open

Crashing on Android #12

JCKodel opened this issue Oct 26, 2022 · 1 comment

Comments

@JCKodel
Copy link

JCKodel commented Oct 26, 2022

Device
Brand: LGE
Model: Nexus 5X
Orientation: Portrait
RAM free: 2.95 GB
Disk free: 2.68 GB
Operating System
Version: Android 6.0.1
Orientation: Portrait
Rooted: Yes

Fatal Exception: java.lang.NoSuchMethodError: No virtual method getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Ljava/util/HashMap; or its super classes (declaration of 'java.util.HashMap' appears in /system/framework/core-libart.jar)
       at net.zonble.flutter_platform_alert.FlutterPlatformAlertPlugin.onMethodCall(FlutterPlatformAlertPlugin.java)
       at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java)
       at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java)
       at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java)
       at io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$TsixYUB5E6FpKhMtCSQVHKE89gQ(DartMessenger.java)
       at io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$0$ceffc6bae7d364cb48afaf1aaebd60bf9050360d0efb9035ebc54f0851df0a05$0.run(DartMessenger.java)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5421)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@xunreal75
Copy link
Contributor

Problem is open and not fixed ;-(

Is ist possible to replace args.getOrDefault in (FlutterPlatformAlertPlugin.kt:45) by
val windowTitle = args["windowTitle"] ?: ""
val text = args["text"] ?: ""
val alertStyle = args["alertStyle"] ?: "ok"

Line 96 val windowTitle = args["windowTitle"] ?: ""
val text = args["text"] ?: ""
val positiveButtonTitle = args["positiveButtonTitle"] ?: ""
val negativeButtonTitle = args["negativeButtonTitle"] ?: ""
val neutralButtonTitle = args["neutralButtonTitle"] ?: ""
val base64Icon = args["base64Icon"] ?: ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants