'@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'

11.7k Views Asked by At

e: /Users/abc/update/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (29, 33): This declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'enter image description here

i want to build the native project

2

There are 2 best solutions below

1
On

@steformicola answer didn't work for me but changing the gradle version in

android/gradle/wrapper/gradle-wrapper.properties

to distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip

worked for me.

Look at this link for related issues.

2
On

Just upgraded to Gradle 7.5.1 and it works. Inside your android directory run:

./gradlew wrapper --gradle-version 7.5.1 --distribution-type=all