Hi,
I am facing issue while using retrofit2 in my aem project.
I have added all the dependency and bundles as well.
Getting error in new OkHttpClient.Builder().
Error Message : noclassdeffounderror kotlin/jvm/internal/intrinsics
Views
Replies
Total Likes
Hi @samikshas963487
Please check, if you have retrofit2 osgi bundle installed and active, if not then try below:
Views
Replies
Total Likes
Hi @samikshas963487 , Please follow the steps suggested by @arunpatidar , Along with that you can also check on below points.
You’re encountering a NoClassDefFoundError related to Kotlin dependencies. This error typically occurs when the Kotlin standard library is not included in your project.
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.8.0</version>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Embed-Dependency>kotlin-stdlib</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.9.0</version>
</dependency>
Hope this will help you !
Regards,
Views
Replies
Total Likes