-
Notifications
You must be signed in to change notification settings - Fork 69
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
Second display not working in Release APK #7
Comments
u run "flutter build apk --release" right? |
Yes i did that,
|
the problem might be related to proguard shrinking |
i don't use proguard shrinking in the project.
|
on debug work normaly, same problem here when run "Flutter run --release" [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(showPresentation, Value null at displayId of type org.json.JSONObject$1 cannot be |
@MarcoGolin What device are you using? |
is the Sunmi D2-mini |
Sunmi D2-mini i think u should use flutter_nearby_connections for it |
my project is already using V2 |
Same error to me, release apk is not working and at same place debug one is working. |
Same issue, |
Worked for me by adding a progaurd rule
|
its because flutter release mode using obfuscating code on it, and DisplayJson.kt in native code will be obfuscated. Or you may use the way above me to avoid obfuscating code by using -keep class com.namit.** { *; } |
i was use two condition but nothing change |
https://developer.android.com/reference/android/support/annotation/Keep |
Another solution will be to use GSON field name annotations on the DisplayJson.kt fields, this way if the variable name changes the annotated name will remain , and it will work fine. |
i have added the -keep class com.namit.** { *; } in proguard . but when i release the apk, the get display shows "null null" but works with debug mode. Release mode error: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value Even when i open example app in release mode, it will show null, null.. I am new to this. could you please help me on this? |
It seems like with the latest flutter, that problem also exists in the example app... Just clone the repo, run |
@VNAPNIC Could you please help here. When we test using release apk its not working |
@patelnirav48 I'm using @arbyazra123's fork successfully (#7 (comment)) |
@hrueger I'm using iMin device (connected through HDMI) will it work on that too? |
I have no idea - try it and report your findings ;-) |
@hrueger Tested, and it works. Thanks a lot. |
displays_manager.dart line 68-70: What is the reason for this code? It changes the list keys, breaking the code in release |
This code is not needed. The author used obfuscated keys for parsing json, but those keys change on each compilation. Check it here |
Here is prguard rules, this should be added to the readme.md of this library so people know its needed in release apk.
|
When i release the apk file, the secondary display didn't work.Why?? Please tell me |
Hello guys, please help me when I release the apk the second display didn't work.Only worked in the debug apk.why is that?? |
Check @arbyazra123's fork (#7 (comment)) |
not working |
I have tried to run your project, its not working |
Describe the bug
When we make release APK , second display does not work.
The text was updated successfully, but these errors were encountered: