klarna / react-native-klarna-inapp-sdk

Klarna's React Native wrapper for the In-App SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

> Task : react-native-klarna-inapp-sdk:compileReleaseJavaWithJavac FAILED

icarusdust opened this issue · comments

Describe the bug
I cannot say if it is a bug, but when I am integrating react-native-klarna-inapp-sdk into my project, and running ./gradlew assembleRelease, it is failing with the following error. Refer to the screenshot.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the documentation to integrate Klarna SDK
  2. Run the build command to build AAB or APK
  3. See error

Screenshots

Screenshot 2023-12-31 at 11 33 22

Impact Level
It is kind of urgent and blocking me from finishing my Android build.

Hi @icarusdust, the latest version of the library is developed using Java 11(similar to all recent RN libraries) and that seems to be causing this issue as I understand it. You may either need to use the previous version or update your project to use JDK 11. Can you please try one of these and let us know if it resolves this

Thanks for getting back @NMGuner. Tried both options, downgraded the SDK version with different Java versions, and tried to build the latest SDK version with JDK 11. I am afraid, none of them helped.

  reason: '<>' with anonymous inner classes is not supported in -source 8
    (use -source 9 or higher to enable '<>' with anonymous inner classes)

It is higher than 9, but not sure why it is considered below 9.

Anything else to check ? @NMGuner

Facing the same issue while using JDK 15, any solution for this ?

A new version is released (v2.2.1) that should resolve the issue.