kanzi 3.2.3lts , kanzi 3.4 都存在这样的问题
新建一个kanzi studio project with c++ application.
进入到android工程目录下,使用scons -j4 编译,
第一次编译libkanzi.so 还没有编译出来,会发现kanzi是先编译apk,然后再link libkanzi.so
所以第一次编译出来的apk没有libkanzi.so 比较小,安装运行时提示如下错误
Process: com.rightware.kanzi.ddddd, PID: 5017
java.lang.UnsatisfiedLinkError: Couldn't load kanzi from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.rightware.kanzi.ddddd-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.rightware.kanzi.ddddd-1, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at com.rightware.kanzi.KanziActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
解决办法就是使用scons 来编译,不要使用多线程