Headless commerce and custom storefronts with Shopify APIs and SDKs
Hi,
I'm trying to get the mobilebuysdk integrated into my android app, but I'm running into this error.
java.lang.NoSuchMethodError: No static method create(Lokhttp3/internal/io/FileSystem;Ljava/io/File;IIJ)Lokhttp3/internal/cache/DiskLruCache; in class Lokhttp3/internal/cache/DiskLruCache; or its super classes (declaration of 'okhttp3.internal.cache.DiskLruCache' appears in /data/app/com.androappdroid.shopifyapidemo-KKcE6nuBJzECFbi2dRtJ0Q==/base.apk)
Here is my code -
private void initializeGraphClient() {
OkHttpClient httpClient = new OkHttpClient.Builder()
.addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
.build();
graphClient=GraphClient.Companion.build(this,
SHOP_DOMAIN ,
API_KEY,
builder -> {
builder.setHttpClient(httpClient);
builder.httpCache(getCacheDir(), config -> {
config.setCacheMaxSizeBytes(1024 * 1024 * 10);
config.setDefaultCachePolicy(HttpCachePolicy.Default.CACHE_FIRST.expireAfter(20, TimeUnit.MINUTES));
return Unit.INSTANCE;
});
return Unit.INSTANCE;
}, null);
}
The SDK version is 7.0.0
Please do let me know what's the issue or if I'm missing out on something.
TIA.
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023