<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ROHIT SINGH</title>
    <description>The latest articles on DEV Community by ROHIT SINGH (@1xrohit).</description>
    <link>https://dev.to/1xrohit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1365957%2F443a9568-2285-4e20-aa57-bfb1086b6cae.png</url>
      <title>DEV Community: ROHIT SINGH</title>
      <link>https://dev.to/1xrohit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/1xrohit"/>
    <language>en</language>
    <item>
      <title>Setup React Native App Development Environment on Ubuntu /Linux Without Android Studio 2024</title>
      <dc:creator>ROHIT SINGH</dc:creator>
      <pubDate>Sun, 24 Mar 2024 12:29:25 +0000</pubDate>
      <link>https://dev.to/1xrohit/setup-react-native-app-development-environment-on-ubuntu-linux-without-android-studio-2024-31c6</link>
      <guid>https://dev.to/1xrohit/setup-react-native-app-development-environment-on-ubuntu-linux-without-android-studio-2024-31c6</guid>
      <description>&lt;p&gt;*&lt;em&gt;Setup React Native App Development Environment on Ubuntu/Linux &lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the world of mobile &lt;strong&gt;app development&lt;/strong&gt;, React Native has emerged as a powerful framework for building cross-platform applications with ease. Its ability to write code once and deploy it across multiple platforms like iOS and Android makes it a favorite among developers. However, setting up a React Native development environment can sometimes be a daunting task, especially when it comes to integrating with Android Studio on Linux systems.&lt;/p&gt;

&lt;p&gt;Fortunately, there's a way to bypass the reliance on Android Studio and streamline the setup process, specifically tailored for Ubuntu users. In this article, we'll guide you through the step-by-step process of setting up** React Native on Ubuntu without the need for Android Studio.**&lt;/p&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before we dive into the installation process, make sure you have the following prerequisites:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ubuntu operating system installed on your machine.&lt;/li&gt;
&lt;li&gt;Basic knowledge of using the terminal.&lt;/li&gt;
&lt;li&gt;Stable internet connection.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Step 1: Install Node.js and npm
&lt;/h3&gt;

&lt;p&gt;Node.js and npm are essential for running JavaScript-based applications. To install them, open your terminal and run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://deb.nodesource.com/setup_21.x | &lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; bash -
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nodejs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installation, verify that Node.js and npm are successfully installed by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt;
npm &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Install JDK (Java Development Kit)
&lt;/h3&gt;

&lt;p&gt;React Native requires JDK for building and running Android applications. Install JDK by executing the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;openjdk-17-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the JDK installation by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;java &lt;span class="nt"&gt;-version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Download and Install Android Command Line Tools
&lt;/h3&gt;

&lt;p&gt;Instead of installing Android Studio, we'll download the Android Command Line Tools and set them up manually. Follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the custom Android Command Line Tools from &lt;a href="https://github.com/1xrohit/Setup-ReactNative-on-Ubuntu-without-Android-Studio/releases/download/AndroidSDK/Android.zip"&gt;this link&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Extract the downloaded archive to a suitable location on your system. For example, you can extract it to &lt;code&gt;$HOME/Android&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Update System PATH
&lt;/h3&gt;

&lt;p&gt;To ensure that the Android SDK tools are accessible from anywhere in the terminal, update the system PATH. Open the &lt;code&gt;.bashrc&lt;/code&gt; file using a text editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following lines to the end of the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANDROID_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/Android/Sdk
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/emulator
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/platform-tools
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/cmdline-tools/latest/bin
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;JAVA_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/jvm/java-17-openjdk-amd64
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="nv"&gt;$JAVA_HOME&lt;/span&gt;/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file and reload the terminal or run &lt;code&gt;source ~/.bashrc&lt;/code&gt; for the changes to take effect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Install React Native CLI
&lt;/h3&gt;

&lt;p&gt;React Native CLI is a command-line interface that allows you to create, build, and run React Native applications. Install it globally using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; react-native-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Create a New React Native Project
&lt;/h3&gt;

&lt;p&gt;With React Native CLI installed, you can create a new React Native project by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx react-native init MyReactNativeApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;MyReactNativeApp&lt;/code&gt; with your desired project name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Run Your React Native App
&lt;/h3&gt;

&lt;p&gt;Navigate to your project directory and start the Metro Bundler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;MyReactNativeApp
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open a new terminal window and run your app on an Android emulator or a connected device:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb devices
npx react-native run-android
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! You have successfully set up React Native on Ubuntu without relying on Android Studio. You're now ready to dive into React Native development and build amazing cross-platform applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Make sure to regularly update Node.js, npm, and other dependencies to the latest versions for optimal performance and security.&lt;/li&gt;
&lt;li&gt;Troubleshooting: If you encounter any issues during the setup process, refer to the official documentation or seek help from the vibrant React Native community.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this streamlined setup, Ubuntu users can harness the power of React Native to build high-quality mobile applications without the overhead of Android Studio. &lt;/p&gt;

&lt;h2&gt;
  
  
  I hope you've found this guide helpful
&lt;/h2&gt;

&lt;p&gt;Follow me on &lt;a href="https://x.com/1xrohit"&gt;twitter&lt;/a&gt;. for more tips. Happy coding!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>linux</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
