![]() If you are using Zsh, then go ahead and run this command to see your Zsh profile: nano ~ /.zshrc The first step is to understand your bash profile setup. I have broken down the solution into steps for easy understanding: Step 1 - Bash/Zsh Profile This meant that I need to uninstall Java JDK 14 and then reinstall every time I want to run which was a tedious process. After diving deeper into Java JDK docs for Mac OS, I came across an article that stated that Mac OS will use the latest installed version of Java JDK as the system default. I still got the output stating Version is Java 14 which meant that even though I had installed Java JDK 8, the machine default was still set to Java JDK 14. After installing Java JDK 8 I tried to run the command. Hence, I went ahead and reinstalled Java JDK 8 by downloading it from Oracle's official website. When I ran into this issue, I had installed Java JDK 14 to run (Project B) and that compiled without any errors, however, when I tried to run (Project A) it would throw a Java error, I understood that the issue came from the Java JDK version upgrade. It is important to note that I am not running the React-Native project using Android Studio, instead I am using the following command: react -native run -android Another project (Project B) which was developed in Java requires me to use Java JDK 14 or above, this is where the issue occurs. It cannot compile on any Java JDK that is higher than Java JDK 8 because of the Gradle version installed in the application when it was created. One of my client's projects (Project A) is developed using Facebook's React-Native and it requires Java JDK 8 to compile for the Android version. The setup I will explain runs perfectly fine on my machine which is a MacBook Pro with Mac OS Monterey Version 12.2. However, in the case of Node, I use Node Version Manager (NVM) to manage multiple versions. Similarly, different versions of Node are required for running different projects. I am a full-time Software Developer which means I run multiple projects on my machine and each project may require a different version of Java JDK to compile or build. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |