react-native-audio-recorder-player icon indicating copy to clipboard operation
react-native-audio-recorder-player copied to clipboard

Inconsistent JVM-target compatibility

Open KrisLau opened this issue 7 months ago • 0 comments

Please fill the template to help you out. Also, please try the Example project compare before submiting the issue when you have certain issue with your project setup.

Version of react-native-audio-recorder-player

3.6.4

Version of React Native

0.72.4

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Build successfully with no error

Actual behavior

Got this error:

Execution failed for task ':react-native-audio-recorder-player:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (11) and 'compileDebugKotlin' (1.8).

My gradle file

buildscript {
    ext {
        buildToolsVersion = "33.0.0"
        minSdkVersion = 24
        compileSdkVersion = 33
        targetSdkVersion = 33
        kotlinVersion = '1.9.21'
        googlePlayServicesAuthVersion = "20.7.0"

        // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
        ndkVersion = "23.1.7779620"
    }

I can't downgrade because otherwise I get a Class 'kotlin.reflect.KClass' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. error

Steps to reproduce the behavior

Build Android app with that buildscript and react native version

KrisLau avatar Nov 28 '23 20:11 KrisLau