IBM MobileFirst 7.1 พร้อม Android Cordova ล้มเหลวเมื่อเริ่มต้น JSONStore

ฉันกำลังพยายามสร้างโครงการ '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)

ใครทราบเรื่องนี้บ้าง ช่วยหน่อยครับ


person Long Phan    schedule 29.12.2017    source แหล่งที่มา
comment
คุณใช้บริการพุชใด ๆ หรือไม่? คุณสามารถแชร์แอปตัวอย่างของคุณได้หรือไม่ เราไม่เห็นปัญหาใดๆ เมื่อพยายามสร้างปัญหาของคุณขึ้นมาใหม่   -  person Keerthi    schedule 29.12.2017
comment
ขอบคุณสำหรับการตอบสนอง Keerthi บริการพุชใด ๆ คุณหมายถึงคำสั่ง 'mfp push' ใช่แล้วฉันก็รันด้วยโปรแกรมจำลองด้วย android studio แอพตัวอย่างใหญ่มาก เลยสงสัยว่าจะแชร์ยังไงดี แต่คุณเคยสร้างโปรเจ็กต์ Hello World IBM Mobilefirst 7.1 พร้อมเปิดใช้งาน JSONStore หรือไม่ มันเริ่มต้นสำเร็จหรือไม่?   -  person Long Phan    schedule 29.12.2017
comment
ใช่ สวัสดีโลกแห่ง MFP 7.1 jsonstore เริ่มต้นได้สำเร็จ ปัญหาของคุณน่าจะเกิดจาก android api ของ simuator และไลบรารี GCM เวอร์ชันที่เข้ากันไม่ได้ คุณช่วยลองใช้โปรแกรมจำลองหรืออุปกรณ์อื่นแล้วรายงานได้ไหม นอกจากนี้คุณยังสามารถอัปโหลดโครงการไปยัง GitHub และแชร์ลิงก์ได้ที่นี่   -  person Keerthi    schedule 29.12.2017
comment
ฉันยังลองใช้ Simulator API 22 ซึ่งเป็นอุปกรณ์ Android จริงเวอร์ชัน 6 และ 7 อีกด้วย แต่ก็ได้รับข้อผิดพลาดเดียวกัน ฉันเพิ่งอัปโหลดโครงการไปที่ gitlab.com/pt.long/testjsonstore IBM mobile ของฉันเวอร์ชันแรก 7.1.0.00.20160801-2318 คุณช่วยบอกฉันหน่อยได้ไหมว่า android API และ mfp เวอร์ชันใดที่คุณใช้ใน helloworld ที่เรียบง่ายของคุณประสบความสำเร็จ?   -  person Long Phan    schedule 29.12.2017
comment
แอปที่คุณมีชาร์ดไม่มีโฟลเดอร์ปลั๊กอิน คุณช่วยอัปโหลดแอปที่สมบูรณ์ได้ไหม   -  person Keerthi    schedule 29.12.2017
comment
ฉันเพิ่งกระทำโปรดลอง :)   -  person Long Phan    schedule 29.12.2017