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

混淆后,关闭串口闪退 #18

Closed
Wxianpeng opened this issue Jan 2, 2019 · 3 comments
Closed

混淆后,关闭串口闪退 #18

Wxianpeng opened this issue Jan 2, 2019 · 3 comments

Comments

@Wxianpeng
Copy link

Wxianpeng commented Jan 2, 2019

at com.kongqw.serialportlibrary.SerialPort.close(Native method)
at com.kongqw.serialportlibrary.SerialPortManager.a(SerialPortManager.java:87)
at com.ubains.aide.VoiceActivity.onDestroy(VoiceActivity.java:883)
at android.app.Activity.performDestroy(Activity.java:6437)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1142) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3818)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)
at android.app.ActivityThread.-wrap5(ActivityThread.java:-1)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke!(Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:772)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)

@Wxianpeng
Copy link
Author

增加 混淆 代码 。 就不会闪退了。。。
-dontwarn com.kongqw.**
-keep class com.kongqw.**{*;}

@MarcoJF888
Copy link

也是关闭串口的时候报错

  if (null != mFd) {
        close();
        mFd = null;
    }

这个close这里

567 2658-2691/? E/art: JNI DETECTED ERROR IN APPLICATION: fid == null
2020-05-22 11:39:11.567 2658-2691/? E/art: in call to GetObjectField
2020-05-22 11:39:11.567 2658-2691/? E/art: from void com.kongqw.serialportlibrary.SerialPort.close()
2020-05-22 11:39:11.567 2658-2691/? E/art: "Timer-2" prio=5 tid=18 Runnable
2020-05-22 11:39:11.567 2658-2691/? E/art: | group="main" sCount=0 dsCount=0 obj=0x12f2fca0 self=0xb16ac600
2020-05-22 11:39:11.567 2658-2691/? E/art: | sysTid=2691 nice=0 cgrp=default sched=0/0 handle=0xb2ba6920
2020-05-22 11:39:11.567 2658-2691/? E/art: | state=R schedstat=( 1653461 1101693 8 ) utm=0 stm=0 core=3 HZ=100
2020-05-22 11:39:11.567 2658-2691/? E/art: | stack=0xb2aa4000-0xb2aa6000 stackSize=1038KB
2020-05-22 11:39:11.567 2658-2691/? E/art: | held mutexes= "mutator lock"(shared held)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #00 pc 0034f0ad /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #1 pc 0032f96d /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+632)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #2 pc 00238381 /system/lib/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+1188)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #3 pc 002393db /system/lib/libart.so (ZN3art9JavaVMExt9JniAbortFEPKcS2_z+66)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #4 pc 0026fad3 /system/lib/libart.so (ZN3art3JNI14GetObjectFieldEP7_JNIEnvP8_jobjectP9_jfieldID+514)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #5 pc 00000b67 /system/priv-app/rktools/rktools.apk (???)
2020-05-22 11:39:11.567 2658-2691/? E/art: native: #6 pc 0003996f /data/dalvik-cache/arm/system@priv-app@rktools@[email protected] (Java_com_kongqw_serialportlibrary_SerialPort_close
+74)
2020-05-22 11:39:11.567 2658-2691/? E/art: at com.kongqw.serialportlibrary.SerialPort.close(Native method)
2020-05-22 11:39:11.567 2658-2691/? E/art: at com.intelligym.rk3288tools.device.b.a.a(SerialPortManager.java:107)
2020-05-22 11:39:11.567 2658-2691/? E/art: at com.intelligym.rk3288tools.device.b.b.f.l(XQTreadmillSerialPort.java:431)
2020-05-22 11:39:11.567 2658-2691/? E/art: at com.intelligym.rk3288tools.device.b.b.f.i(XQTreadmillSerialPort.java:425)
2020-05-22 11:39:11.568 2658-2691/? E/art: at com.intelligym.rk3288tools.activity.factory.FactoryXqTreadmillActivity$1.run(FactoryXqTreadmillActivity.java:201)
2020-05-22 11:39:11.568 2658-2691/? E/art: at java.util.TimerThread.mainLoop(Timer.java:555)
2020-05-22 11:39:11.568 2658-2691/? E/art: at java.util.TimerThread.run(Timer.java:505)

@VAEAZE
Copy link

VAEAZE commented Mar 15, 2024

增加 混淆 代码 。 就不会闪退了。。。 -dontwarn com.kongqw.** -keep class com.kongqw.**{*;}

这个是怎么增加?在打包的时候?加在gradle配置文件里面啊

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

3 participants