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

在 flutter 1.12.13上安卓release 包崩溃 #16

Closed
iyuhang opened this issue Dec 30, 2019 · 14 comments
Closed

在 flutter 1.12.13上安卓release 包崩溃 #16

iyuhang opened this issue Dec 30, 2019 · 14 comments

Comments

@iyuhang
Copy link
Contributor

iyuhang commented Dec 30, 2019

测试机型:1加7T pro
rtm 版本:agora_rtm: ^0.9.8

现象:
打开rtm 初始化开关,应用崩溃,关闭 rtm 可以正常运行
在 debug 下可以正常运行

`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G87, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.41.1)
[✓] Connected device (1 available)`

logcat:

`2019-12-30 14:22:59.041 859-2638/? E/sensors-hal: ssc_conn_event_cb:484, event[0] msg_id=776, ts=418540088417
2019-12-30 14:22:59.042 859-2638/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=21794181627645, type=4
2019-12-30 14:23:00.098 859-2638/? E/sensors-hal: ssc_conn_event_cb:484, event[0] msg_id=776, ts=418560364172
2019-12-30 14:23:00.098 859-2638/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=21795237656551, type=0
2019-12-30 14:23:00.558 932-3972/? E/oemlogkit: oemlogkit: Android log path: (null). Inside
2019-12-30 14:23:00.558 932-3972/? E/oemlogkit: oemlogkit: !start_log, sleep
2019-12-30 14:23:01.603 1513-5036/? E/ANDR-PERF-JNI: com_qualcomm_qtiperformance_native_perf_io_prefetch_start
2019-12-30 14:23:01.607 2001-2003/? E/ANDR-IOP: io prefetch is disabled
2019-12-30 14:23:01.610 1513-1541/? E/system_server: Invalid ID 0x00000000.
2019-12-30 14:23:01.660 8516-8516/? E/fixtime.fixtim: Not starting debugger since process cannot load the jdwp agent.
2019-12-30 14:23:01.665 1090-8535/? E/ANDR-RAMBOOST_SERVER: ramboost cmd_len = 93 cmd: iop_start -1 com.fixtime.fixtime /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A== false
2019-12-30 14:23:01.665 1090-8535/? E/ANDR-RAMBOOST_SERVER: is_in_recent_list is TRUE
2019-12-30 14:23:01.665 1090-8535/? E/ANDR-RAMBOOST_SERVER: io prefetch is deactivate
2019-12-30 14:23:01.668 1090-8536/? E/ANDR-RAMBOOST_SERVER: ramboost cmd_len = 95 cmd: iop_start 8516 com.fixtime.fixtime /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A== false
2019-12-30 14:23:01.668 1090-8536/? E/ANDR-RAMBOOST_SERVER: io prefetch Capture is deactivated
2019-12-30 14:23:01.669 1513-2571/? E/ScreenModeService: getAppToken AppWindowToken{7efdd02 token=Token{6cae4d ActivityRecord{6fe19e4 u0 com.fixtime.fixtime/com.example.fixtime.MainActivity t20584}}}
2019-12-30 14:23:01.669 1513-2571/? E/ScreenModeService: setRefreshRate token AppWindowToken{7efdd02 token=Token{6cae4d ActivityRecord{6fe19e4 u0 com.fixtime.fixtime/com.example.fixtime.MainActivity t20584}}} rate 0
2019-12-30 14:23:01.713 8516-8540/? E/Perf: Fail to get file list com.fixtime.fixtime
2019-12-30 14:23:01.714 8516-8540/? E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2019-12-30 14:23:01.714 8516-8540/? E/Perf: Fail to get file list com.fixtime.fixtime
2019-12-30 14:23:01.714 8516-8540/? E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2019-12-30 14:23:01.714 8516-8540/? E/Perf: Fail to get file list oat
2019-12-30 14:23:01.714 8516-8540/? E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2019-12-30 14:23:01.916 1513-14077/? E/ScreenModeService: getAppToken AppWindowToken{7efdd02 token=Token{6cae4d ActivityRecord{6fe19e4 u0 com.fixtime.fixtime/com.example.fixtime.MainActivity t20584}}}
2019-12-30 14:23:01.916 1513-14077/? E/ScreenModeService: setRefreshRate token AppWindowToken{7efdd02 token=Token{6cae4d ActivityRecord{6fe19e4 u0 com.fixtime.fixtime/com.example.fixtime.MainActivity t20584}}} rate 1
2019-12-30 14:23:01.937 749-8565/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.004 749-8569/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.145 851-996/? E/LocSvc_APIClientBase: onResponseCb:894] ERROR: 5 ID: 118
2019-12-30 14:23:02.209 749-8574/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.210 8516-8516/? E/AGORA_SDK: cannot open log file for writing: agorartm.log, err=30
2019-12-30 14:23:02.210 8516-8575/? E/AGORA_SDK: cannot open log file for writing: agorartm.log, err=30
2019-12-30 14:23:02.211 8516-8516/? E/flutter: [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoSuchMethodError: no static method "Lio/agora/rtm/jni/AgoraRtmServiceJNI;.SwigDirector_IChannelEventHandler_onJoinSuccess(Lio/agora/rtm/jni/IChannelEventHandler;)V"
at io.agora.rtm.jni.AgoraRtmServiceJNI.swig_module_init(Native Method)
at io.agora.rtm.jni.AgoraRtmServiceJNI.(:2)
at io.agora.rtm.jni.AgoraRtmServiceJNI.new_IRtmServiceEventHandler(Native Method)
at io.agora.rtm.jni.n.(:4)
at e.a.b.a.i$a.(:1)
at e.a.b.a.i$a.(:2)
at e.a.b.a.i.a(:12)
at e.a.b.a.i.(:15)
at e.a.b.a.k.a(:1)
at e.a.b.k.a(:1)
at e.a.a.xa.(:4)
at e.a.a.a.c(:11)
at e.a.a.a.onMethodCall(:10)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(:2)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(:5)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(:2)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:174)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
2019-12-30 14:23:02.211 8516-8516/? A/flutter: [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).

--------- beginning of crash

2019-12-30 14:23:02.211 8516-8516/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 8516 (fixtime.fixtime), pid 8516 (fixtime.fixtime)
2019-12-30 14:23:02.231 749-8583/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.231 749-8584/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus7Pro_EEA/OnePlus7Pro:10/QKQ1.190716.003/1911070200:user/release-keys'
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: Revision: '0'
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: ABI: 'arm64'
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: Timestamp: 2019-12-30 14:23:02+0800
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: pid: 8516, tid: 8516, name: fixtime.fixtime >>> com.fixtime.fixtime <<<
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: uid: 10550
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
'
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x0 0000000000000000 x1 0000000000002144 x2 0000000000000006 x3 0000007fe5b8f260
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x4 0000000000000080 x5 0000000000000080 x6 0000000000000080 x7 8000000000000000
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x8 00000000000000f0 x9 64892113c7c9e1fc x10 0000000000000001 x11 0000000000000000
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x12 fffffff0fffffbdf x13 0000000000000003 x14 0000000000000001 x15 000027ce05d5141e
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x16 00000076a2d25738 x17 00000076a2d03be0 x18 0000000000000000 x19 0000000000002144
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x20 0000000000002144 x21 00000000ffffffff x22 0000000000000014 x23 0000000000000099
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x24 00000075a3fff440 x25 00000075a550c570 x26 00000075a550c5a0 x27 00000075b4bf0000
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: x28 00000075a3ee0000 x29 0000007fe5b8f300
2019-12-30 14:23:02.291 8587-8587/? A/DEBUG: sp 0000007fe5b8f240 lr 00000076a2cb5404 pc 00000076a2cb5430
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: backtrace:
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #00 pc 0000000000073430 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #1 pc 000000000028e924 /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #2 pc 0000000000283938 /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #3 pc 000000000028238c /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #4 pc 00000000002bd71c /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #5 pc 0000000000290000 /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #6 pc 00000000002926ec /data/app/com.fixtime.fixtime-CRTst439WnuUaJDnHGZR3A==/lib/arm64/libflutter.so!libflutter.so (offset 0x270000) (BuildId: 741afda8f9ff0f9c)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #7 pc 000000000001836c /system/lib64/libutils.so (android::Looper::pollInner(int)+832) (BuildId: 06ffce1f95bfc99838abf018674b00d8)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #8 pc 0000000000017f8c /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56) (BuildId: 06ffce1f95bfc99838abf018674b00d8)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #9 pc 000000000013d05c /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: e6bd16703da09cd81ffd2051c35a9b7d)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #10 pc 00000000002acafc /system/framework/arm64/boot-framework.oat (art_jni_trampoline+140) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #11 pc 000000000074ee34 /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+228) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #12 pc 000000000074bc38 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+680) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #13 pc 00000000004d4eb4 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+756) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #14 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #15 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #16 pc 00000000004aff10 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #17 pc 00000000004b1ab4 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1480) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #18 pc 000000000043cde8 /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #19 pc 00000000000c2c34 /system/framework/arm64/boot.oat (art_jni_trampoline+180) (BuildId: 9c5b079029dc900d8e51f890a6592e684a834eb6)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #20 pc 00000000009cab48 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #21 pc 00000000009d2740 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2256) (BuildId: 06dbf0176553b8f5ddbe5d5f7816390d31feb793)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #22 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #23 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #24 pc 00000000004aff10 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #25 pc 00000000004afb00 /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+408) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #26 pc 00000000003ba5ec /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+624) (BuildId: 615724283373fd93e5fb77101fe57dab)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #27 pc 00000000000c099c /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: e6bd16703da09cd81ffd2051c35a9b7d)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #28 pc 00000000000c3900 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+988) (BuildId: e6bd16703da09cd81ffd2051c35a9b7d)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #29 pc 00000000000035b0 /system/bin/app_process64 (main+1376) (BuildId: d23f7f711e9d93214484f019017fb1a7)
2019-12-30 14:23:02.352 8587-8587/? A/DEBUG: #30 pc 000000000006ebc4 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
2019-12-30 14:23:02.476 749-8590/? E/ResolverController: No valid NAT64 prefix (112, /0)
2019-12-30 14:23:02.488 1257-1257/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_04
2019-12-30 14:23:02.488 1513-8591/? E/ScreenModeService: getAppToken AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}}
2019-12-30 14:23:02.488 1513-8591/? E/ScreenModeService: setRefreshRate token AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}} rate 0
2019-12-30 14:23:02.495 1513-8591/? E/ScreenModeService: getAppToken AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}}
2019-12-30 14:23:02.495 1513-8591/? E/ScreenModeService: setRefreshRate token AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}} rate 0
2019-12-30 14:23:02.506 1513-1538/? E/system_server: Invalid ID 0x00000000.
2019-12-30 14:23:02.511 1513-1538/? E/system_server: Invalid ID 0x00000000.
2019-12-30 14:23:02.519 1513-2125/? E/InputDispatcher: channel 'ce5a81c com.fixtime.fixtime/com.example.fixtime.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-12-30 14:23:02.529 1513-12473/? E/ScreenModeService: getAppToken AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}}
2019-12-30 14:23:02.529 1513-12473/? E/ScreenModeService: setRefreshRate token AppWindowToken{2ec3b95 token=Token{309ef4c ActivityRecord{3f9d37f u0 net.oneplus.launcher/.Launcher t20520}}} rate 0
2019-12-30 14:23:02.989 1513-1563/? E/OnePlusSmartBoostManager: Exception : file not exits :/proc/8516/memplus_type
2019-12-30 14:23:03.667 1513-1562/? E/OPPerf: Exception : file not exits :/proc/8516/main_boost_switch
2019-12-30 14:23:04.111 859-2638/? E/sensors-hal: ssc_conn_event_cb:484, event[0] msg_id=776, ts=418637596329
2019-12-30 14:23:04.111 859-2638/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=21799260164728, type=4
2019-12-30 14:23:04.399 859-2638/? E/sensors-hal: ssc_conn_event_cb:484, event[0] msg_id=776, ts=418642941760
2019-12-30 14:23:04.399 859-2638/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=21799538572593, type=0
2019-12-30 14:23:04.609 749-749/? E/Netd: Error adding route ::/0 -> fe80::ec8d:bbf0:efce:ccb0 rmnet_data1 to table 1011: File exists
2019-12-30 14:23:04.650 1513-4011/? E/WifiService: Error checking permission: java.lang.SecurityException: UID 10356 has no location permission
2019-12-30 14:23:04.650 1513-8625/? E/libc: Access denied finding property "persist.vendor.dpm.feature"
2019-12-30 14:23:04.650 1513-8625/? E/libc: Access denied finding property "persist.vendor.dpm.tcm"
2019-12-30 14:23:04.652 1513-5036/? E/WifiService: Error checking permission: java.lang.SecurityException: UID 10356 has no location permission
2019-12-30 14:23:04.673 1513-4011/? E/WifiService: Error checking permission: java.lang.SecurityException: UID 10356 has no location permission
2019-12-30 14:23:04.673 1513-8613/? E/arp_NetworkMonitor: the network is not OK, so check the duplicate mac
2019-12-30 14:23:04.763 2330-2330/? E/ndroid.systemu: Invalid ID 0x00000000.
2019-12-30 14:23:04.773 2310-3054/? E/bt_osi_wakelock: wakelock_acquire wakelock acquired
2019-12-30 14:23:04.774 2310-3056/? E/bt_osi_wakelock: wakelock_release wakelock released
2019-12-30 14:23:04.802 859-2638/? E/sensors-hal: ssc_conn_event_cb:484, event[0] msg_id=776, ts=418650867772
2019-12-30 14:23:04.802 859-2638/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=21799951385718, type=4
2019-12-30 14:23:05.044 1513-4628/? E/libc: Access denied finding property "persist.vendor.dpm.tcm"
2019-12-30 14:23:05.765 1513-3940/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
`

@LichKing-2234
Copy link
Collaborator

flutter 默认 开启R8混淆,请问有配置SDK的混淆配置么,或者禁用混淆再尝试

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019

@LichKing-2234

按照 flutter 官网文档的指南作了以下配置:

将 useProguard 改为 false 后打包,运行还是会崩溃

1./android/app/build.gradle 配置

android {

...

buildTypes {

    release {

        signingConfig signingConfigs.release

        minifyEnabled true
        useProguard true

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

    }
}

}

2.proguard-rules.pro:

Flutter wrapper

-keep class io.flutter.app.** { ; }
-keep class io.flutter.plugin.
* { ; }
-keep class io.flutter.util.
* { ; }
-keep class io.flutter.view.
* { ; }
-keep class io.flutter.
* { ; }
-keep class io.flutter.plugins.
* { ; }
-dontwarn io.flutter.embedding.
*

@LichKing-2234
Copy link
Collaborator

@iyuhang 主要是minifyEnabled这个设成false

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019

这个也设为 false 了
还是会崩 ^

@LichKing-2234

@LichKing-2234
Copy link
Collaborator

@iyuhang 我本地试过了,这样配置不会crash

buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
            minifyEnabled false
            shrinkResources false
        }
    }

@LichKing-2234
Copy link
Collaborator

@iyuhang 你可以用我们的demo build release试试,如果还有问题,将你的demo发给我,我这边试试

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019

改成这样可以了,但有个问题不做压缩和混淆,代码还是安全的吗?

release {
signingConfig signingConfigs.release

    minifyEnabled false
    useProguard false
    shrinkResources false

    // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

@LichKing-2234
Copy link
Collaborator

你可以还原这部分配置,参考我们Android SDK的混淆配置,加上去即可

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019

Android SDK 混淆的配置是哪有呢?
我在这个文档https://docs.agora.io/cn/Real-time-Messaging/product_rtm?platform=All%20Platforms里也没找到
有参考的配置方式吗

@LichKing-2234
Copy link
Collaborator

@LichKing-2234
Copy link
Collaborator

proguard-rules.pro中加一行即可

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019

发现改成下面这样也就可以了,看来主要还是 minifyEnabled 的事,那不开这个代码是安全的对吧,只是大小会大点?

release {
signingConfig signingConfigs.release

    minifyEnabled false
    useProguard true
    shrinkResources false

    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

@LichKing-2234
Copy link
Collaborator

minifyEnabled就会开启混淆,具体配置会读取配置文件

@iyuhang
Copy link
Contributor Author

iyuhang commented Dec 30, 2019 via email

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