During the build process using npx react-native run-android
I get the following error:
> Task :expo-modules-core:compileDebugKotlin FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
681 actionable tasks: 665 executed, 16 up-to-date
e: java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
at org.jetbrains.kotlin.com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
...
About my project:
It was 1st developed using expo sdk, then ejected (by other developer), I cloned the repo on my local machine and tried the following steps to build and run the app:
git glone https://...
cd repo
git checkout -b my_feature_branch
yarn cache clean
yarn install
npx react-native run-android
Then after these steps, I got some build errors but I resolved them, next, I encountered the build error (mentioned above), to solve this I tried the following solution https://stackoverflow.com/a/70675546/11685381 but no luck, I'm still stuck with this error, it's been 3 days since I'm stuck.
My config:
OS
: Ubuntu 20.04
local.properties:
sdk.dir = /home/user/Android/Sdk
ndk.dir = /home/user/Android/Sdk/ndk
java --version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
gradle version in project/android/gradle/wrapper/gradle-wrapper.properties
=> gradle-7.3-all.zip
Can someone please help me out here? Thanks in advance!