Android NDK 开发 打包失败 运行时报错

viking-小傻 发布于 2016/09/08 20:25
阅读 549
收藏 0

三个模块  sdk  app fastjson  app中集成sdk fastjson ,编译时都成功,运行时报错,打包失败了, NDK的配置以及build-tools都是正常的。 一天了。。心好累

MobUncaughtExceptionHandler: Couldn't load stlport_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.rg.cpspay-1.apk"],nativeLibraryDirectories=[/data/app-lib/cc.rg.cpspay-1, /vendor/lib, /system/lib]]]: findLibrary returned null
                                                                           java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.rg.cpspay-1.apk"],nativeLibraryDirectories=[/data/app-lib/cc.rg.cpspay-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 net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:112)
                                                                               at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:107)
                                                                               at cc.rengu.cpp.sdk.db.sqlciper.SqliteUtil.<init>(SqliteUtil.java:23)
                                                                               at cc.rengu.cpp.sdk.db.sqlciper.SdkInfoSqlciper.<init>(SdkInfoSqlciper.java:26)
                                                                               at cc.rengu.cpp.sdk.init.SdkService.querySdkInitResult(SdkService.java:242)
                                                                               at cc.rengu.cpp.sdk.interfaces.SdkClientService.isSdkInitialized(SdkClientService.java:52)
                                                                               at cc.rengu.cpspay.ui.fragment.CloudCardFragment.sdkInitResult(CloudCardFragment.java:205)
                                                                               at cc.rengu.cpspay.ui.fragment.CloudCardFragment.onFirst(CloudCardFragment.java:57)
                                                                               at cc.rengu.cpspay.base.BaseFragment.onCreateView(BaseFragment.java:24)
                                                                               at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
                                                                               at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1016)
                                                                               at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1197)
                                                                               at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
                                                                               at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1562)
                                                                               at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
                                                                               at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:511)
                                                                               at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
                                                                               at android.app.Activity.performStart(Activity.java:5261)
                                                                               at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2160)
                                                                               at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
                                                                               at android.app.ActivityThread.access$800(ActivityThread.java:138)
                                                                               at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                               at android.os.Looper.loop(Looper.java:136)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:5014)
                                                                               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:805)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621)
                                                                               at dalvik.system.NativeStart.main(Native Method)
09-08 18:14:06.722 27692-27692/cc.rg.cpspay E/AndroidRuntime: FATAL EXCEPTION: main
                                                              Process: cc.rg.cpspay, PID: 27692
                                                              java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cc.rg.cpspay-1.apk"],nativeLibraryDirectories=[/data/app-lib/cc.rg.cpspay-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 net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:112)
                                                                  at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:107)
                                                                  at cc.rengu.cpp.sdk.db.sqlciper.SqliteUtil.<init>(SqliteUtil.java:23)
                                                                  at cc.rengu.cpp.sdk.db.sqlciper.SdkInfoSqlciper.<init>(SdkInfoSqlciper.java:26)
                                                                  at cc.rengu.cpp.sdk.init.SdkService.querySdkInitResult(SdkService.java:242)
                                                                  at cc.rengu.cpp.sdk.interfaces.SdkClientService.isSdkInitialized(SdkClientService.java:52)
                                                                  at cc.rengu.cpspay.ui.fragment.CloudCardFragment.sdkInitResult(CloudCardFragment.java:205)
                                                                  at cc.rengu.cpspay.ui.fragment.CloudCardFragment.onFirst(CloudCardFragment.java:57)
                                                                  at cc.rengu.cpspay.base.BaseFragment.onCreateView(BaseFragment.java:24)
                                                                  at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
                                                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1016)
                                                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1197)
                                                                  at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
                                                                  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1562)
                                                                  at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
                                                                  at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:511)
                                                                  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
                                                                  at android.app.Activity.performStart(Activity.java:5261)
                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2160)
                                                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
                                                                  at android.app.ActivityThread.access$800(ActivityThread.java:138)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5014)
                                                                  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:805)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621)
                                                                  at dalvik.system.NativeStart.main(Native Method)

加载中
0
魔仙剑痴
静态链接stlport_static试试
viking-小傻
viking-小傻
所以我一直认为是我这边环境的问题,但是基本的配置都装上了。
viking-小傻
viking-小傻
这个项目是在同事那里拿过来的,在他那里可以正常运行,在我这边就是打包失败,
0
魔仙剑痴
他已经报错了 不能加载stlport shared这货跟版本有关,跟ndk的库环境有关,最好静态链接进去
返回顶部
顶部