引入了安卓sdk,
打包时是不是不能加混淆?
加入混淆时报错:
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: fid == null
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] in call to GetLongField
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] from boolean cn.easyar.CameraFrameStreamer.attachCamera(cn.easyar.CameraDevice)
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] | group="main" sCount=0 dsCount=0 obj=0x75242fa8 self=0x5584746330
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] | sysTid=26900 nice=0 cgrp=default sched=0/0 handle=0x7f9cab5e80
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] | state=R schedstat=( 766704442 85943590 1176 ) utm=68 stm=8 core=6 HZ=100
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] | stack=0x7ff1c19000-0x7ff1c1b000 stackSize=8MB
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] | held mutexes= "mutator lock"(shared held)
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] native: #00 pc 00003ae4 /system/lib64/libbacktrace_libc++.so (_ZN9Backtrace6UnwindEmP8ucontext+28)
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] native: #01 pc 0000001c ???
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] at cn.easyar.CameraFrameStreamer.attachCamera(Native method)
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] at com.langlang.preschool.activity.ar.HelloAR.initialize(unavailable:-1)
06-28 17:42:20.405 26900-26900/? A/art: art/runtime/check_jni.cc:65] at com.langlang.preschool.activity.ar.GLView.onAttachedToWindow(unavailable:-1)
看官方demo中build.gradle中配置:
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
是不启用混淆的。
----------------------------------------------
混淆中已加入代码:-keepclass com.easyar.** {*;}
-----------------------------------------
所以是不是不能加混淆????
------------------------------------------
29日再次测试报错如下:
JNI DETECTED ERROR IN APPLICATION: JNI GetLongField called with pending exception 'java.lang.NoSuchFieldError' thrown in boolean cn.easyar.CameraFrameStreamer.attachCamera(cn.easyar.CameraDevice):-2