ฉันกำลังพยายามสร้างโครงการ 'heloworld' ด้วย IBM Mobilefirst 7.1 รวม Cordova โดยใช้แพลตฟอร์ม Android และเปิดใช้งานคุณสมบัติ JSONStore
- ขั้นตอนที่ 1: สร้างลิงก์โฟลว์โปรเจ็กต์ mobilefirst Cordova https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/hello-world/integrating-mfpf-sdk-in-cordova-applications/#sampleApplication
หมายเหตุ: แพลตฟอร์ม android และเพิ่มปลั๊กอิน jsonstore เพิ่มเติม - ขั้นตอนที่ 2: เพิ่มฟีเจอร์ JSONStore ใน application-descriptor.xml
ขั้นตอนที่ 3: เพิ่มโค้ดในฟังก์ชัน wlCommonInit
WL.JSONStore.init(collections).then(function (collections) { // handle success - collection.people (people's collection) console.log('ok') }).fail(function (error) { // handle failure console.log('error', error) });
ขั้นตอนที่ 4: สร้างและรันด้วย Android studio พร้อม Android Emulator - Nexus_4_API_19 ฉันได้รับข้อผิดพลาดของ console.log('error', error)
col: "people" doc: Object err: -1 msg: "PERSISTENT_STORE_FAILURE" res: Object src: "initCollection" usr: "jsonstore"
บันทึกคอนโซลใน Android Studio
I/chromium: [INFO:CONSOLE(44)] "กำลังเรียก WL.Client.init(wlInitOptions);" แหล่งที่มา: file:///android_asset/www/plugins/cordova-plugin-mfp/bootstrap.js (44)
W/PluginManager: คำเตือนเธรด: การเรียกใช้ exec() ไปยัง DeviceAuth.getDeviceUUID บล็อกเธรดหลักเป็นเวลา 181ms ปลั๊กอินควรใช้ CordovaInterface.getThreadPool().
D/EGL_emulation: eglMakeCurrent: 0xb8eea440: ver 2 0
I/chromium: [INFO:CONSOLE(17)] "1", แหล่งที่มา: file:// /android_asset/www/js/index.js (17)
D/EGL_emulation: eglMakeCurrent: 0xb8eea440: เวอร์ชัน 2 0
I/dalvikvm: ไม่พบวิธี com.google.android.gms.common GooglePlayServicesUtil.isGooglePlayServicesAvailable อ้างอิงจากเมธอด com.worklight.wlclient.push.common.GCMClientFactory.useGooglePlayServices
W/dalvikvm: VFY: ไม่สามารถแก้ไขเมธอดแบบคงที่ 631: Lcom/google/android/gms/common/GooglePlayServicesUtil; isGooglePlayServicesAvailable (Landroid/content/Context;)I
D/dalvikvm: VFY: แทนที่ opcode 0x71 ที่ 0x0006
D/dalvikvm: GC_FOR_ALLOC ปลดปล่อย 748K, ฟรี 13% 6159K/7012K, หยุดชั่วคราว 10ms, รวม 12ms< br/> D/gralloc_ranchu: gralloc_alloc: การสร้างขอบเขต ashmem ขนาด 163840
D/dalvikvm: กำลังพยายามโหลด lib /data/data/com.ibm.testjsonstore/files/libcrypto.so.1.0.0 0xa4fcd670
D/dalvikvm: เพิ่ม lib ที่แชร์ /data/data/com.ibm.testjsonstore/files/libcrypto.so.1.0.0 0xa4fcd670
D/dalvikvm: ไม่พบ JNI_OnLoad ใน /data/data/com.ibm .testjsonstore/files/libcrypto.so.1.0.0 0xa4fcd670 ข้าม init
I/chromium: [INFO:CONSOLE(29)] "erorr" แหล่งที่มา: file:///android_asset/www/js/index .js (29)
ใครทราบเรื่องนี้บ้าง ช่วยหน่อยครับ