簡體   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