我正在尝试使用 Salesforce sdk 开发在本机 android 中使用 smartStore。
我遵循了 Salesforce 文档,并且每当我想使用 SmartStoreSDKManager 获取实例时
SmartStoreSDKManager sdkManager = SmartStoreSDKManager.getInstance();
我的应用程序崩溃异常:
FATAL EXCEPTION: main
Process: com.audi.audidrive, PID: 21152
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.audi.audidrive/com.audi.audidrive.activities.ClaimActivity}
:java.lang.ClassCastException: com.salesforce.androidsdk.app.SalesforceSDKManager cannot be cast to com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3190)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300)
at android.app.ActivityThread.access$1000(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by: java.lang.ClassCastException: com.salesforce.androidsdk.app.SalesforceSDKManager cannot be cast to com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager
atcom.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager.getInstance(SmartStoreSDKManager.java:132)
at com.audi.audidrive.activities.ClaimActivity.onCreate(ClaimActivity.java:88)
at android.app.Activity.performCreate(Activity.java:6575)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3143)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300)
at android.app.ActivityThread.access$1000(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
有人可以帮我在原生 android 中使用 smartStore 吗?任何源代码使用?谢谢