A problem occurred configuring project ':expo-in-app-purchases'

Hello,

I installed the expo in app purchase library but it fails my build with the following message:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':expo-in-app-purchases'.
> Could not open proj generic class cache for build file 'ROOT/PROJECT_NAME/node_modules/expo-in-app-purchases/android/build.gradle' (ROOT/.gradle/caches/6.8/scripts/eufjydhjgd9qbq1jrijc2cfe0).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60

I tried to resolve by removing the "cache" folder from ".gradle" and rebuild but it didn't solve the error.

additional info:

java version = 16
buildToolsVersion = “29.0.3”
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30

Downgrading Java to 11 solved the problem!