Getting error while trying to create Square Client in Java

SquareClient client = new SquareClient.Builder()
.bearerAuthCredentials(new BearerAuthModel.Builder(accessToken).build())
.environment(Environment.PRODUCTION)
.build();
I am getting the below error while trying to create a square client . java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at io.apimatic.core.GlobalConfiguration.(GlobalConfiguration.java:104)
at io.apimatic.core.GlobalConfiguration.(GlobalConfiguration.java:22)
at io.apimatic.core.GlobalConfiguration$Builder.build(GlobalConfiguration.java:334)
at com.squareup.square.SquareClient.(SquareClient.java:250)
at com.squareup.square.SquareClient.(SquareClient.java:110)
at com.squareup.square.SquareClient$Builder.build(SquareClient.java:985)

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Java SDK
Download, Configure, and Run the Client Sample
Build on Android: Reader SDK

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Hey @Sravani! If you set up the Java SDK Quickstart, are you still running into this error there?

No, When I set up Java SDK Quickstart , I am not getting this error.

Got it, thanks for checking! In that case, it seems likely that there is an issue with your either your environment or your dependencies that’s resulting in this error. It’s hard for me to say exactly what it might be with the information provided, but I would recommend comparing the quickstart to your own project and trying to identify where that difference may be.