Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Task :react-native-image-picker:compileDebugJavaWithJavac FAILED

When trying to run my project on my windows computer it is not working, it works on my macOS but when running it on windows it throws the following errors:

Task :react-native-image-picker:compileDebugJavaWithJavac FAILED
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
                                                           ^
  symbol:   variable TIRAMISU
  location: class VERSION_CODES

Running it with npx react-native run-android

build.gradle has the following:


buildscript {
    ext {
        buildToolsVersion = "30.0.3"
        minSdkVersion = 30
        compileSdkVersion = 30
        targetSdkVersion = 30
                ndkVersion = "20.1.5948944"
    }

Have been trying to change the number with everything I have installed, 29,30,31,and 33 minSdk, buildTools, compile, and targeted nothing is working.

Currently, have node 14 and JDK 11

Error changes when I use 33 to the following one:

 Task :react-native-webview:compileDebugJavaWithJavac FAILED

Have already tried multiple times ./gradlew clean

Someone knows what's going on? what am I missing?

like image 272
JoseGE Avatar asked Jun 18 '26 23:06

JoseGE


1 Answers

I downgrade version of react-native-image-picker to 0.38.1, works for me

like image 146
Mohammad Avatar answered Jun 21 '26 13:06

Mohammad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!