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

Installation not working #542

Open mihai-moldovan opened 6 years ago

mihai-moldovan commented 6 years ago

Trying to integrate the SDK into a new vanilla Android project doesn't seem to build. Once the build errors are fixed it then crashes at runtime when a simple graphql query is executed.

Starting a new vanilla Android Studio Kotlin project and adding the dependency in build.gradle (replacing compile with implementation or api) will not build the project, or it will crash at runtime

So far I found the following problems:

Once I do this, the project will build but it will crash at runtime.

If I add the dependencies as they appear in the SDK code, the query succeeds with no crash.

I attached the small dummy project used to test this issue TestBuy.zip

EDIT: I'm using a MacOS with Android Studio v3.1.2 and Kotlin

adsonpleal commented 6 years ago

Same issue here, I have the same environment MacOS with Android Studio v3.1.2 and Kotlin.

Did you find any solution?

EDIT: I solved by adding this no my gradle: implementation group: 'joda-time', name: 'joda-time', version: '2.3'

Ainiuso commented 5 years ago

I'm experiencing the same issue with jodatime and okhttp. However, I found the issue with okhttp dependency. In MobileBuy/gradle/dependencies.gradle okhttp dependency is declared as "com.squareup.okhttp3:logging-interceptor:$versions.okHttpVersion" instead of ""com.squareup.okhttp3:okhttp:$versions.okHttpVersion". Not sure what's wrong with jodatime, the answer above solves it however.