Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Integrate the React-Native project to Android-Studio?

Tags:

I had tried to import the react-native project to android studio, but the "index.android.js" file is not shown in android-studio IDE.. So what I will do ?

like image 476
Diwan Dhanvani Avatar asked Feb 07 '17 08:02

Diwan Dhanvani


People also ask

Can we run React Native project in Android Studio?

Step 2: Start your application npx react-native run-android is one way to run your app - you can also run it directly from within Android Studio.

How does React Native work on Android?

React Native (also known as RN) is a popular JavaScript-based mobile app framework that allows you to build natively-rendered mobile apps for iOS and Android. The framework lets you create an application for various platforms by using the same codebase.


2 Answers

You need to import "android" folder only.

like image 129
Santosh Anand Avatar answered Sep 18 '22 23:09

Santosh Anand


To be able to see the root project files, you need to change your View Mode from "Android" (which is for native Android development only) to "Project", which is the mode for a generic project type and all the files will be in the same exact position as they will if you access them via folders

Screenshot for semplicity:

enter image description here

like image 22
MatPag Avatar answered Sep 19 '22 23:09

MatPag