React Native Screens

107 Views Asked by At

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-screens:compileDebugKotlin'.

Error while evaluating property 'compilerOptions.jvmTarget' of task ':react-native-screens:compileDebugKotlin'. Failed to calculate the value of property 'jvmTarget'. > Unknown Kotlin JVM target: 20

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 16s error Failed to install the app.

1

There are 1 best solutions below

2
On

In your project's root terminal, run this below command:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.20.jdk/Contents/Home

The main to my error was jdk version. Before i was using latest jdk 20 version which is not supported yet. So I had to downgrade my jdk version from 20 to 11 and then successfully build the app.