react native system compatibility issues

16 Views Asked by At

I am getting bellow issues when I run npm react-native doctor, I am using Ubuntu OS & all the details are mentioned below, please help me with it.

For cloned repository I am getting this flutter doctor:

Android
 ✖ Adb - No devices and/or emulators connected. Please create emulator with Android Studio or connect Android device.
 ✖ JDK - Required to compile Java code
   - Version found: N/A
   - Version supported: >= 17 <= 20
 ✖ Android Studio - Required for building and installing your app on Android
 ✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
 ✖ Gradlew - Build tool required for Android builds
 ✓ Android SDK - Required for building and installing your app on Android

The other repo that I created is showing me below stack on react-native doctor 
Android
 ✓ Adb - Required to verify if the android device is attached correctly
 ✖ JDK - Required to compile Java code
   - Version found: N/A
   - Version supported: >= 17 <= 20
 ✖ Android Studio - Required for building and installing your app on Android
 ✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
 ✓ Gradlew - Build tool required for Android builds
 ✓ Android SDK - Required for building and installing your app on Android
node --version
v18.17.1

npm --version
10.2.0

Installed java version
java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)

Updated paths in .bashrc of my Ubuntu OS
Java:
export JAVA_HOME="/lib/jvm/java-17-openjdk-amd64/"
export PATH="$PATH":"$JAVA_HOME/bin"

export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools

Also, I am getting the error mentioned below while running th3e repository I created

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:androidJdkImage'.
   > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JdkImageTransform: /home/rushikesh/Android/Sdk/platforms/android-34/core-for-system-modules.jar.
         > jlink executable /usr/lib/jvm/java-17-openjdk-amd64/bin/jlink does not exist.

I've tried setting up the path, changing the Java versions to 11 & 18, but nothing is working, tried updating all the sdk manager versions.

0

There are 0 best solutions below