Skip to content

ImageKit instantiation error #29

@Hadit1993

Description

@Hadit1993

Hi.
I went along with documentaion and added config.properties in my resource folder and added public and private keys and url endpont there.
and here is my imagekit instantiation:

@SpringBootApplication
class EShopBackApplication

fun main(args: Array<String>) {
    
    runApplication<EShopBackApplication>(*args)
	val imageKit = ImageKit.getInstance()
	val config = Utils.getSystemConfig(EShopBackApplication::class.java)
	imageKit.config = config
}

When I run the app I got this error:

Exception in thread "main" java.lang.NoSuchFieldError: Companion
	at okhttp3.internal.Util.<clinit>(Util.kt:70)
	at okhttp3.OkHttpClient.<clinit>(OkHttpClient.kt:1073)
	at io.imagekit.sdk.tasks.RestClient.<init>(RestClient.java:60)
	at io.imagekit.sdk.ImageKit.getInstance(ImageKit.java:40)
	at com.hadit1993.eshopback.EShopBackApplicationKt.main(EShopBackApplication.kt:16)

What is the problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions