Shopify / mobile-buy-sdk-android

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.
MIT License
216 stars 136 forks source link

NoClassDefFoundError: Failed resolution of: Lorg/joda/time/format/DateTimeFormat #562

Open Pradeepkumar2091 opened 6 years ago

Pradeepkumar2091 commented 6 years ago

Hello I am getting exception when adding

GraphClient graphClient = GraphClient.builder(this) .shopDomain(AppConstants.SHOP_DOMAIN) .accessToken(AppConstants.API_KEY) .defaultHttpCachePolicy(HttpCachePolicy.NETWORK_ONLY) .build(); QueryGraphCall call = graphClient.queryGraph(query);'

---------------Exception-------

Process: com.deep.shop8shopify_java, PID: 19490 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/joda/time/format/DateTimeFormat; at com.shopify.buy3.Utils.<clinit>(Utils.java:35) at com.shopify.buy3.GraphClient$Builder.<init>(GraphClient.java:140) at com.shopify.buy3.GraphClient$Builder.<init>(GraphClient.java:125) at com.shopify.buy3.GraphClient.builder(GraphClient.java:67) at com.deep.shop8shopify_java.HomeActivity.onCreate(HomeActivity.java:35) at android.app.Activity.performCreate(Activity.java:5966) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2408) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519) at android.app.ActivityThread.access$800(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:189) at android.app.ActivityThread.main(ActivityThread.java:5532) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.joda.time.format.DateTimeFormat" on path: DexPathList[[zip file "/data/app/com.deep.shop8shopify_java-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.shopify.buy3.Utils.<clinit>(Utils.java:35)  at com.shopify.buy3.GraphClient$Builder.<init>(GraphClient.java:140)  at com.shopify.buy3.GraphClient$Builder.<init>(GraphClient.java:125)  at com.shopify.buy3.GraphClient.builder(GraphClient.java:67)  at com.deep.shop8shopify_java.HomeActivity.onCreate(HomeActivity.java:35)  at android.app.Activity.performCreate(Activity.java:5966)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2408)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)  at android.app.ActivityThread.access$800(ActivityThread.java:162)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:189)  at android.app.ActivityThread.main(ActivityThread.java:5532)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)  Suppressed: java.lang.ClassNotFoundException: org.joda.time.format.DateTimeFormat at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 19 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

And in Gradle implementation 'com.shopify.mobilebuysdk:buy3:3.2.3'

Please help me.

XiaomingTian8776 commented 5 years ago

Hello I have same issues. Did you figure out it? If you fixed, plz post. Thanks.

XiaomingTian8776 commented 5 years ago

I fixed. https://github.com/dlew/joda-time-android it works. Happy code.

emadahmed-vl commented 3 years ago

hey, I use the dependency lately with kotlin language and the latest Gradle version 4.1.3 but still have the same problem