繁体   English   中英

JSONStore初始化失败,并出现PERSISTENT_STORE_FAILURE(Dalvik)/ OPERATION_FAILED_ON_SPECIFIC_DOCUMENT(ART)

[英]JSONStore initalization fails with PERSISTENT_STORE_FAILURE (Dalvik) / OPERATION_FAILED_ON_SPECIFIC_DOCUMENT (ART)

我有一个使用MobileFirst Platform 7创建的混合应用程序,可以在许多物理Android设备,AVD以及MFP控制台预览/仿真器上完美运行。 在所有情况下,设备和AVD都在运行KitKat(v4.4.4)。

为了保持信息的持久性,我正在使用JSONStore Javascript API。

但是,在一台设备上(Panasonic Toughpad FZ-B2)。 JSONstore拒绝初始化,并且在尝试初始化集合时都会引发PERSISTENT_STORE_FAILURE错误。

相信这可能是我的代码,因此我从MFP开发人员中心下载,编译并安装了示例JSONStore JavaScript API项目。

我已将此安装到所有设备(三星Galaxy Tab2,索尼Xperia Z3,THL T6S和Toughpad)。 在所有设备上,应用程序都可以快乐地运行,但是在ToughPad上,我再次得到PERSISTENT_STORE_FAILURE。

我应该怎么做才能调查/解决原因?
错误的屏幕截图以及我认为是设备上的相关信息: http : //files.interestingmix.com.au/stack/toughpadJSON.png

我尝试过使用API​​级别19和22编译apk,但行为没有差异(在它工作的设备上,它总是可以工作,但是韧皮垫无法配合使用)

更新

我已经能够将设备上的运行时间从Dalvik(旧)更改为ART(新),现在抛出的错误是OPERATION_FAILED_ON_SPECIFIC_DOCUMENT(在“入门”应用程序中的同一位置(底部),因此需要新的屏幕截图) ,我正在调查

更新2(与Toughpad结果一起修订)

我终于能够将ADB连接到Toughpad设备,并因此获得LogCat。 似乎该错误与尝试打开libcrypto.so.1.0.0有关。 据我所知,特定运行时程序包中没有所需的库文件。 (请注意,我已将设备恢复在Dalvik上运行,因为这可能是KitKat更加稳定和受支持的基础)

这可能与Tougpad设备(我怀疑)是x86_64位运行时有关,因此没有提供库吗? 我们如何检查/解决这个问题?

Logcat的输出如下:

  04-10 05:02:31.810: D/dalvikvm(6889): Late-enabling CheckJNI
04-10 05:02:31.810: D/dalvikvm(6889): Try to disable coredump for pid 6889
04-10 05:02:31.810: D/dalvikvm(6889): Process 6889 nice name: com.JSONStoreAPI
04-10 05:02:31.810: D/dalvikvm(6889): Extra Options: not specified
04-10 05:02:31.830: E/jdwp(6889): Failed sending reply to debugger: Broken pipe
04-10 05:02:31.830: D/dalvikvm(6889): Debugger has detached; object registry had 1 entries
04-10 05:02:31.840: I/CordovaLog(6889): Changing log level to DEBUG(3)
04-10 05:02:31.850: W/WLClient(6889): WLClient.createInstance in WLClient.java:220 :: You should pass a context that is assignable from the Activity class. WLClient instance may be used to start an activity.
04-10 05:02:31.900: D/wl.splashscreen(6889): WLSplashScreen.show in WLSplashScreen.java:64 :: Showing Splash Screen
04-10 05:02:31.910: D/CordovaActivity(6889): Resuming the App
04-10 05:02:31.910: D/WLClient(6889): WLClient$ActivityListener.onActivityStarted in WLClient.java:1434 :: on activity started com.JSONStoreAPI.JSONStoreAPI
04-10 05:02:31.920: D/WLClient(6889): WLClient$ActivityListener.onActivityResumed in WLClient.java:1423 :: on activity resumed com.JSONStoreAPI.JSONStoreAPI . activity count = 1
04-10 05:02:31.920: D/prepackagedAssetManager(6889): PrepackagedAssetsManager.copyPrepackagedAssetsToLocalStorage in PrepackagedAssetsManager.java:68 :: New installation/upgrade detected, copying resources and saving new checksum
04-10 05:02:31.940: I/ufoGralloc(6889): Hello, this is UFO GRALLOC/Intel Corporation
04-10 05:02:31.940: D/(6889): droid_create_context : config id = 5 conf->NativeVisualID=1
04-10 05:02:31.940: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.940: I/(6889): Requested context : GLES 2.0
04-10 05:02:31.950: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.950: D/OpenGLRenderer(6889): Enabling debug mode 0
04-10 05:02:31.950: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:31.960: D/wl(6889): WL.doPrepareAssetsWork in WL.java:293 :: no need to check web resource integrity
04-10 05:02:32.000: D/CordovaActivity(6889): CordovaActivity.init()
04-10 05:02:32.000: V/WebViewChromiumFactoryProvider(6889): Binding Chromium to main looper Looper (main, tid 1) {26733be0}
04-10 05:02:32.000: I/LibraryLoader(6889): Expected native library version number "",actual native library version number ""
04-10 05:02:32.010: I/chromium(6889): [INFO:library_loader_hooks.cc(116)] Chromium logging enabled: level = 0, default verbosity = 0
04-10 05:02:32.010: I/BrowserStartupController(6889): Initializing chromium process, renderers=0
04-10 05:02:32.020: E/AudioManagerAndroid(6889): BLUETOOTH permission is missing!
04-10 05:02:32.020: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:32.020: D/(6889): droid_create_context : config id = 1 conf->NativeVisualID=1
04-10 05:02:32.020: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:02:32.020: I/(6889): Requested context : GLES 2.0
04-10 05:02:32.050: W/chromium(6889): [WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
04-10 05:02:32.060: D/CordovaWebView(6889): CordovaWebView is running on device made by: PANASONIC
04-10 05:02:32.060: D/CordovaActivity(6889): CordovaActivity.createViews()
04-10 05:02:32.060: D/CordovaWebView(6889): >>> loadUrl(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.060: D/PluginManager(6889): init()
04-10 05:02:32.060: I/dalvikvm(6889): Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method com.worklight.androidgap.plugin.WLInitializationPlugin.initialize
04-10 05:02:32.060: W/dalvikvm(6889): VFY: unable to resolve virtual method 580: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
04-10 05:02:32.060: D/dalvikvm(6889): VFY: replacing opcode 0x6e at 0x001a
04-10 05:02:32.140: D/CordovaWebView(6889): >>> loadUrlNow()
04-10 05:02:32.150: D/SoftKeyboardDetect(6889): Ignore this event
04-10 05:02:32.190: D/CordovaWebViewClient(6889): onPageStarted(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.190: D/CordovaActivity(6889): onMessage(onPageStarted,file:///android_asset/www/skinLoader.html)
04-10 05:02:32.250: D/JsMessageQueue(6889): Set native->JS mode to OnlineEventsBridgeMode
04-10 05:02:32.250: D/CordovaWebViewClient(6889): onPageFinished(file:///android_asset/www/skinLoader.html)
04-10 05:02:32.250: D/CordovaActivity(6889): onMessage(onPageFinished,file:///android_asset/www/skinLoader.html)
04-10 05:02:32.390: V/StatusBar(6889): StatusBar: initialization
04-10 05:02:32.390: V/StatusBar(6889): Executing action: _ready
04-10 05:02:32.400: W/CordovaPlugin(6889): Attempted to send a second callback for ID: StatusBar1173806884
04-10 05:02:32.400: W/CordovaPlugin(6889): Result was: "Invalid action"
04-10 05:02:32.410: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:32.450: D/skuwa(6889): Detected device 0F31:14 family 15:9
04-10 05:02:32.760: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:32.760: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:32.770: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:32.770: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:32.770: D/CordovaActivity(6889): onMessage(networkconnection,wifi)
04-10 05:02:32.800: W/PluginManager(6889): THREAD WARNING: exec() call to WLApp.writeUserPref blocked the main thread for 22ms. Plugin should use CordovaInterface.getThreadPool().
04-10 05:02:32.810: D/CordovaWebViewClient(6889): onPageStarted(file:///android_asset/www/default/index.html)
04-10 05:02:32.810: D/JsMessageQueue(6889): Set native->JS mode to null
04-10 05:02:32.810: D/CordovaActivity(6889): onMessage(onPageStarted,file:///android_asset/www/default/index.html)
04-10 05:02:32.850: W/chromium(6889): [WARNING:simple_index_file.cc(338)] Could not map Simple Index file.
04-10 05:02:32.850: I/chromium(6889): [INFO:simple_index_file.cc(437)] Simple Cache Index is being restored from disk.
04-10 05:02:32.860: D/JsMessageQueue(6889): Set native->JS mode to OnlineEventsBridgeMode
04-10 05:02:33.200: V/StatusBar(6889): Executing action: _ready
04-10 05:02:33.200: W/CordovaPlugin(6889): Attempted to send a second callback for ID: StatusBar1365464329
04-10 05:02:33.200: W/CordovaPlugin(6889): Result was: "Invalid action"
04-10 05:02:33.200: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:33.210: D/CordovaNetworkManager(6889): Connection Type: wifi
04-10 05:02:33.210: D/CordovaNetworkManager(6889): Connection Extra Info: "eBlueprint-X6-anac2"
04-10 05:02:34.260: D/CordovaActivity(6889): onMessage(spinner,stop)
04-10 05:02:37.860: D/CordovaLog(6889): file:///android_asset/www/default/worklight/cordova.js: Line 1171 : deviceready has not fired after 5 seconds.
04-10 05:02:37.860: I/chromium(6889): [INFO:CONSOLE(1171)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/default/worklight/cordova.js (1171)
04-10 05:02:37.870: D/CordovaLog(6889): file:///android_asset/www/default/worklight/cordova.js: Line 1164 : Channel not fired: onDOMContentLoaded
04-10 05:02:37.870: I/chromium(6889): [INFO:CONSOLE(1164)] "Channel not fired: onDOMContentLoaded", source: file:///android_asset/www/default/worklight/cordova.js (1164)
04-10 05:03:52.370: D/dalvikvm(6889): Debugger has detached; object registry had 1 entries
04-10 05:03:59.810: D/CordovaActivity(6889): Paused the application!
04-10 05:03:59.810: D/CordovaWebView(6889): Handle the pause
04-10 05:03:59.810: D/WLClient(6889): WLClient$ActivityListener.onActivityPaused in WLClient.java:1416 :: on activity paused com.JSONStoreAPI.JSONStoreAPI . activity count = 0
04-10 05:03:59.880: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:03:59.900: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:04:00.140: D/WLClient(6889): WLClient$ActivityListener.onActivitySaveInstanceState in WLClient.java:1428 :: on activity save instance state com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:00.140: D/WLClient(6889): WLClient$ActivityListener.onActivityStopped in WLClient.java:1440 :: on activity stopped com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:00.150: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:01.410: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:01.410: D/CordovaActivity(6889): Resuming the App
04-10 05:04:01.410: D/WLClient(6889): WLClient$ActivityListener.onActivityStarted in WLClient.java:1434 :: on activity started com.JSONStoreAPI.JSONStoreAPI
04-10 05:04:01.410: D/WLClient(6889): WLClient$ActivityListener.onActivityResumed in WLClient.java:1423 :: on activity resumed com.JSONStoreAPI.JSONStoreAPI . activity count = 1
04-10 05:04:01.440: D/(6889): Pixel Format : GGL_PIXEL_FORMAT_RGBA_8888
04-10 05:04:40.270: I/dalvikvm(6889): Total arena pages for JIT: 11
04-10 05:04:40.290: D/CordovaWebViewClient(6889): onPageFinished(file:///android_asset/www/default/index.html)
04-10 05:04:40.290: D/CordovaActivity(6889): onMessage(onPageFinished,file:///android_asset/www/default/index.html)
04-10 05:04:40.320: D/NONE(6889): ondeviceready event dispatched
04-10 05:04:40.360: D/NONE(6889): wlclient init started
04-10 05:04:40.360: D/NONE(6889): Read cookies: null
04-10 05:04:40.360: D/NONE(6889): CookieMgr read cookies: {}
04-10 05:04:40.370: W/NONE(6889): Note that if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
04-10 05:04:40.410: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:04:40.410: D/NONE(6889): before: initOptions.onSuccess
04-10 05:04:40.430: I/dalvikvm(6889): Could not find method com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable, referenced from method com.worklight.wlclient.push.common.GCMClientFactory.useGooglePlayServices
04-10 05:04:40.430: W/dalvikvm(6889): VFY: unable to resolve static method 721: Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable (Landroid/content/Context;)I
04-10 05:04:40.430: D/dalvikvm(6889): VFY: replacing opcode 0x71 at 0x0006
04-10 05:04:40.430: D/GCMClientFactory(6889): GCMClientFactory.useGooglePlayServices in GCMClientFactory.java:42 :: Google Play Services is not used because the play services library is not found. So using the default GCM helper implementation.
04-10 05:04:40.440: D/GCMClientFactory(6889): GCMClientFactory.getInstance in GCMClientFactory.java:28 :: Using GCMHelperClient
04-10 05:04:40.440: W/GCMHelperClient(6889): GCMHelperClient.unregisterReceivers in GCMHelperClient.java:95 :: unregister:Receiver not registered: null
04-10 05:04:40.440: W/GCMHelperClient(6889): GCMHelperClient.unregisterReceivers in GCMHelperClient.java:101 :: unregister:Receiver not registered: null
04-10 05:04:40.450: D/NONE(6889): after: initOptions.onSuccess
04-10 05:04:40.460: D/NONE(6889): added onPause and onResume event handlers
04-10 05:04:40.460: D/NONE(6889): wlclient init success
04-10 05:04:45.360: D/CordovaLog(6889): : Line 0 : event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
04-10 05:04:45.360: I/chromium(6889): [INFO:CONSOLE(0)] "event.returnValue is deprecated. Please use the standard event.preventDefault() instead.", source:  (0)
04-10 05:04:45.390: D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:545 :: Extracting zip file: featurelibs/armeabi/libcrypto.so.1.0.0
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 12
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 13
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 14
04-10 05:04:45.430: I/dalvikvm(6889): Total arena pages for JIT: 15
04-10 05:04:45.490: D/dalvikvm(6889): Trying to load lib /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0
04-10 05:04:45.490: D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:555 :: Loading library using System.load: /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0
04-10 05:04:45.530: D/houdini(6889): [7174] Loading library(version: 4.0.6.44921 RELEASE)... successfully.
04-10 05:04:45.540: D/dalvikvm(6889): Added shared lib /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0
04-10 05:04:45.540: D/dalvikvm(6889): No JNI_OnLoad found in /data/data/com.JSONStoreAPI/files/libcrypto.so.1.0.0 0x4ce6b1d0, skipping init
04-10 05:04:45.560: I/NONE(6889): Destroy finished succesfully
04-10 05:04:48.920: D/dalvikvm(6889): GC_FOR_ALLOC freed 2437K, 26% free 7398K/9880K, paused 5ms, total 5ms
04-10 05:04:48.980: D/dalvikvm(6889): Trying to load lib /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0
04-10 05:04:48.980: D/dalvikvm(6889): Added shared lib /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0
04-10 05:04:48.980: D/dalvikvm(6889): No JNI_OnLoad found in /data/app-lib/com.JSONStoreAPI-1/libstlport_shared.so 0x4ce6b1d0, skipping init
04-10 05:04:48.980: D/dalvikvm(6889): Trying to load lib /data/app-lib/com.JSONStoreAPI-1/libsqlcipher_android.so 0x4ce6b1d0
04-10 05:04:48.980: E/dalvikvm(6889): dlopen("/data/app-lib/com.JSONStoreAPI-1/libsqlcipher_android.so") failed: dlopen failed: could not load library "libcrypto.so.1.0.0" needed by "libsqlcipher_android.so"; caused by library "libcrypto.so.1.0.0" not found
04-10 05:04:48.990: E/JSONSTORE(6889): JSONStoreLogger.logError in JSONStoreLogger.java:189 :: Error during provision
04-10 05:04:48.990: E/JSONSTORE(6889): java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libcrypto.so.1.0.0" needed by "libsqlcipher_android.so"; caused by library "libcrypto.so.1.0.0" not found
04-10 05:04:48.990: E/JSONSTORE(6889):  at java.lang.Runtime.loadLibrary(Runtime.java:364)
04-10 05:04:48.990: E/JSONSTORE(6889):  at java.lang.System.loadLibrary(System.java:526)
04-10 05:04:48.990: E/JSONSTORE(6889):  at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:142)
04-10 05:04:48.990: E/JSONSTORE(6889):  at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:136)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.jsonstore.database.DatabaseManager.openDatabaseIfNecessary(DatabaseManager.java:179)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.jsonstore.database.DatabaseManager.checkDatabaseAgainstSchema(DatabaseManager.java:98)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.jsonstore.database.DatabaseSchema.isSchemaMismatched(DatabaseSchema.java:416)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.jsonstore.api.WLJSONStore.provisionDatabase(WLJSONStore.java:149)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.jsonstore.api.WLJSONStore.openCollections(WLJSONStore.java:345)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.androidgap.jsonstore.dispatchers.ProvisionActionDispatcher.initializeCollection(ProvisionActionDispatcher.java:146)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.androidgap.jsonstore.dispatchers.ProvisionActionDispatcher.databaseActionDispatch(ProvisionActionDispatcher.java:132)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.androidgap.jsonstore.dispatchers.BaseDatabaseActionDispatcher.actionDispatch(BaseDatabaseActionDispatcher.java:36)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.androidgap.jsonstore.dispatchers.BaseActionDispatcher.dispatch(BaseActionDispatcher.java:90)
04-10 05:04:48.990: E/JSONSTORE(6889):  at com.worklight.androidgap.plugin.DispatchingPlugin$ActionDispatcherRunnable.run(DispatchingPlugin.java:79)
04-10 05:04:48.990: E/JSONSTORE(6889):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
04-10 05:04:48.990: E/JSONSTORE(6889):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
04-10 05:04:48.990: E/JSONSTORE(6889):  at java.lang.Thread.run(Thread.java:841)
04-10 05:04:49.000: I/NONE(6889): PERSISTENT_STORE_FAILURE
04-10 05:04:49.000: E/wl.jsonstore(6889): {"src":"initCollection","err":-1,"msg":"PERSISTENT_STORE_FAILURE","col":"people","usr":"jsonstore","doc":{},"res":{}}
04-10 05:05:35.740: D/CordovaActivity(6889): Paused the application!
04-10 05:05:35.740: D/CordovaWebView(6889): Handle the pause
04-10 05:05:35.740: D/WLClient(6889): WLClient$ActivityListener.onActivityPaused in WLClient.java:1416 :: on activity paused com.JSONStoreAPI.JSONStoreAPI . activity count = 0
04-10 05:05:35.750: D/NONE(6889): Flush called
04-10 05:05:35.770: D/(6889): Surface destroy: ANDROID_NATIVE_WINDOW_MAGIC
04-10 05:05:35.780: D/WLClient(6889): WLClient$ActivityListener.onActivitySaveInstanceState in WLClient.java:1428 :: on activity save instance state com.JSONStoreAPI.JSONStoreAPI
04-10 05:05:35.780: D/WLClient(6889): WLClient$ActivityListener.onActivityStopped in WLClient.java:1440 :: on activity stopped com.JSONStoreAPI.JSONStoreAPI
04-10 05:05:35.790: W/IInputConnectionWrapper(6889): showStatusIcon on inactive InputConnection

JSONSTORE代码是MFP入门开发人员中心提供的应用程序,因为我想使用干净的受信任代码库(出于简短性和篇幅限制,仅提供了main.js的相关部分):

//Dependencies
    var $ = jQuery,
        _ = lodash;

    //CONSTANTS
    var PEOPLE_COLLECTION_NAME = 'people',
        KEY_VALUE_COLLECTION_NAME = 'keyvalue',
        INIT_FIRST_MSG = 'PERSISTENT_STORE_NOT_OPEN',
        NAME_FIELD_EMPTY_MSG = 'Name field is empty',
        AGE_FIELD_EMPTY_MSG = 'Age field is empty',
        ID_FIELD_EMPTY_MSG = 'Id field is empty',
        EMPTY_TABLE_MSG = 'No documents found',
        DESTROY_MSG = 'Destroy finished succesfully',
        INIT_MSG = 'Collection initialized',
        ADD_MSG = 'Data added to the collection',
        REPLACE_MSG = 'Document replaced succesfully, call find.',
        REMOVE_MSG = 'Documents removed: ',
        COUNT_MSG = 'Documents in the collection: ',
        CLOSE_ALL_MSG = 'JSONStore closed',
        REMOVE_COLLECTION_MSG = 'Removed all data in the collection',
        LOAD_MSG = 'New documents loaded from adapter: ',
        PUSH_MSG_FAILED = 'Could not push some docs, res: ',
        PUSH_MSG = 'Push finished',
        PASS_CHANGED_MSG = 'Password changed succesfully',
        COUNT_QUERY_ERROR_MSG = 'FIND_BY_QUERY_EXPECTED_A_STRING',
        COUNT_QUERY_MSG = "Documents in the collection with name = ";


    ...
    ...
    ...
    ...
    ...

//init
$('button#init').on('click', function () {

        //Get references to the input fields DOM elements
        var usernameField = $('input#init-username'),
            passwordField = $('input#init-password');

        //Get values from the input fields
        var username = usernameField.val() || '',
            password = passwordField.val() || '';

        //Create the optional options object passed to init
        var options = {};

        //Check if a username was passed
        if (username.length > 0) {
            options.username = username;
        }

        //If if a password was passed
        if (password.length > 0) {
            options.password = password;
        }

        //JSONStore collections metadata
        var collections = {};

        //Define the 'people' collection and list the search fields
        collections[PEOPLE_COLLECTION_NAME] = {

            searchFields : {name: 'string', age: 'integer'},

            //-- Start optional adapter metadata
            adapter : {
                name: 'People',
                add: 'addPerson',
                remove: 'removePerson',
                replace: 'replacePerson',
                load: {
                    procedure: 'getPeople',
                    params: [],
                    key: 'peopleList'
                }
            }
            //-- End optional adapter metadata
        };

        //Define the 'keyvalue' collection and use additional search fields
        collections[KEY_VALUE_COLLECTION_NAME] = {
            searchFields : {},
            additionalSearchFields : { key: 'string' }
        };

        //Initialize the people collection
        WL.JSONStore.init(collections, options)

        .then(function () {
            _logMessage(INIT_MSG);
            _callEnhanceToAddKeyValueMethods();
        })

        .fail(function (errorObject) {
            _logError(errorObject.msg);
        });
    });

它找不到用于x86_64体系结构的libcrypto 这是IBM MobileFirst Platform Foundation目前没有的库。

您可以在https://developer.ibm.com/mobilefirstplatform/help上提交增强功能请求

现在,我通过强制加载“正确的”来使应用程序在Toughpad设备上工作
libcrypto.so压缩文件。

从Panasonic硬垫板中查看logcat,它从armeabi中解压缩了libcrypto的文件。

D/com.worklight.nativeandroid.common.WLUtils(6889): WLUtils.loadLib in WLUtils.java:545 :: Extracting zip file: featurelibs/armeabi/libcrypto.so.1.0.0

针对x86文件夹中的同名zip文件分析此文件校验和,我发现它们是不同的

通过从以下位置删除libcrypto.so.1.0.0.zip文件
资产/功能库/ armeabi,并将其替换为
asset / featurelibs / x86,我能够运行该应用程序,并且JSON存储为
以及应用程序的所有其他元素(直到
当前测试显示)。 64位方面似乎没有任何作用
差异,也许是一条红鲱鱼。

此屏幕快照显示了我关于替换zip文件的含义

这是否意味着生成的代码中有一些错误?
apk,导致该应用从armeabi文件夹解压缩资产文件
即使它在x86平台上运行?

此刻的主要缺点是,每次构建Android环境时,我都需要再次执行zip文件替换,然后再将其部署到设备上。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM