Is there any way to develop a React Native app for Android without installing Android Studio ?
On Ubuntu 18.04 the apt command proposes a lot of android packages: android-sdk, android-sdk-platform-tools etc...
What do I need exactly to get React Native working properly ?
Please don't use expo or another SDKs of react native. React Native CLI is recommended everywhere because its performance is not comparable to expo and it is much more lightweight! Android Studio is just an IDE! If you setup your android development environment correctly there is no need to install Android Studio IDE (This is for experts!) but it is recommended to install for amateur users.
If you don't want to use the Android studio, you can take advantage of the Expo. Expo is the best way to assist React-native. You can run the app without the Android studio, and when you refresh, you can see the modified code right away.
Look at this official document and follow it slowly.
you don't need Android Studio at all, if you are using react native cli you can install it on your phone and run it there.
An attempt of solution to use react native without android studio and without expo is to build directly in your device.
you must install adb first by following this link install-adb-fastboot-on-ubuntu 18.04
and then you should follow this link react-native running-on-device
It will help you.
I'm using usb cable to install debug apk in my phone (react-native run-android). I put my phone in the same network (WIFI) with my machine (server) and configure the server address and port to debug remotely in the phone. After that i remove the usb cable.
In short everything is explained on the link above
I'm quite new to NativeScript. Currently, one of my projects is using NativeScript to develop cross-platform app. It has a 3rd-party lib which is written in java. But the result is not as good as I expected. I was struggling to find the problem since the console didn't log valuable info regarding to native code.
Instead, I import the project to Android Studio which is under the folder of platform/android. But it logs error when I hit the "run" button.
I want to know:
Is it possible to debug native code directly with VS Code. At least print out java native error or cat log.
How can I debug native code in Android Studio? How to solve the problem I ran into?
I'd be very appreciated, if anyone can answer my questions. Thanks!
Let me start off by saying there's no official integration with Android Studio. All I can provide is a workaround that will make it possible.
Note: The steps provided below are tested with NativeScript CLI 3.1.1 and will probably work also with 3.2.0.
The first problem is you don't have "node" set in your global path so first of all, you need to add it to PATH. Node required for NativeScript to run. You can look at how to set it up here
If you want to be able to run the project with Android Studio you can follow these steps:
After you've done that you need to change the <app_name>/platforms/android/build.gradle file as described here
The above change will enable you to open <app_name>/platforms/android in Android Studio
Run <app_name>:clean task from gradle
Run the task default for Android Studio, that will prompt you for emulator or device on which to run:
I am trying to work on react native for android application development. I am using android studio for that, but I am unable to debug the .js files developed for react native. Whenever there is any problem with code its giving me error, Unexpected Token, I am unable to know that how to debug or get proper error. Is there any framework available to work on React native for Android app development. I have already figured out a lot but unable to get any solution to debug android app based on React Native.
You can debug JavaScript code, console.log etc in Chrome. You have to select "Debug in Chrome" from the developer menu on device first and that will open a new tab on Chrome at localhost:8081/debugger-ui. However, to debug in Chrome, keep in mind you have to install React Developer Tools on Chrome https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
You need to debug in Chrome. There are good docs on the RN site about debugging:
https://facebook.github.io/react-native/docs/debugging.html#content
However, if you have syntax errors the debugger won't help you, but Chrome Dev tools might give you a better idea of where the error is.
I have an android app built via Ionic Framework. The issue is it is working fine in the browser but not working as expected in the android app, which I installed on my phone. The issue is that I am not able to navigate the app on my phone.After connecting to chrome dev tools, seeing the link in the dev tools I found out that there is a difference. The link in dev tools is
file:///android_asset/www/index.html#/sideMenu/dashboard/dashboard/month
and link in my browser is
http://localhost:8100/#/sideMenu/dashboard/dashboard/month
could this be the reason? Most of you would be doing the same thing. So how do you guys resolve it?
EDIT
Screen shot of chrome inspect
There were errors in my app generating from the fact that It was not able to access the internet. Download the Cordova's whitelisting plugin. It should do the trick and it's a known issue that if you have even a single error in your app. It could possibly break the flow.
The recently launched react native features just iOS app example and docs.
Yes.
React Native for Android was released September 14th, 2015.
Docs: http://facebook.github.io/react-native/
No. You can't build Android apps with this release.
Facebook has indicated that they are working on an Android version, and famously said "give us 6 months", which some people have taken as a promise. I wouldn't base any important business decisions on the illusion that it will be unveiled when the 6 months is over, but you can at least take some hope in the fact that they're serious about making it production-ready before they give us access to it, and that it's not just a pie-in-the-sky hope.
Also, as others have pointed out, Facebook has already release apps that they've built with the Android version of React Native. So at least parts of it are ready for prime time.
UPDATE
Early support for React Native for Android has been pushed to GitHub!
As noted, there are several things that are currently not working if trying to port an application from iOS. But it's worth checking out.
https://github.com/facebook/react-native/commit/42eb5464fd8a65ed84b799de5d4dc225349449be
It is not aiming to be a cross platform, write-once run-anywhere, tool. It is aiming to be learn-once write-anywhere. -Colin Eberhardt, from Raywenderlich
Good news is that React Native for Android is finally here. (https://code.facebook.com/posts/1189117404435352)
while you can't do it right now, it shouldn't take that long.
The first React Native Android App has been published about two weeks ago in the play store as tweeted by the reactjs twitter account:
https://twitter.com/reactjs/status/615638361328349185
Great news! Now its possible!
"And so it happens, the commit we're waiting since about 6 months!" - usereact.com
Please read more on: http://www.reactnative.com/react-native-for-android/
Watch this video: https://www.youtube.com/watch?v=MNNR01NF290
I've tried out Facebook react native on Android and it really worked.
Simple Ubuntu install guide can be found here
Simple js files: link
Yes , We can now developed android apps too in react-native.
and some of the apps are already developed in react-native for android
suchs as:
1)F8
2)Facebook ads manager
3)Squad
4)Discovery VR
5)Ziliun etc..
and many more still counting.
Developers from around the world now opting react-native for mobile app development because of easy of use of JSX syntax.
and also it is commonly noted as simply the V in MVC.
Since React makes no assumptions about the rest of your technology stack, it's easily embeddable within an existing non-React Native app.
TLDR; Yes,
Detailed answer (As of November 2017)
React Native android application development is very stable and a good number of Android applications have been already built and used in production using React-Native.
You can find a showcase of applications here. Most of them have both IOS and Android versions.
You can also easily integrate your native Android java code to react-native. Refer here
As a developer who is building Android app using react-native with a lot of native java code dependencies, react-native runs stable and I found the documentation and community support is adequate.
Yes, it works for both the platforms ios and android, be sure to mention code entry points in app.js if it uses different code for different platforms. However native functions like native events or location manager need to be coded in native languages and then exported using RCT_EXPORT, you can find more about it in the docs
Sure,
Using React Native you can build real mobile app. real app means close to platform or simply can say 99% native app.react native provide easy way for building native android app using javascript for lucrative design.You have basic knowledge of android studio and error fixing in android studio related native module integration and good understanding of react.js then you can build android app using react native.
Basic Requirement for android app
1. Configure android studio please follow below link and avoid installation of python.
https://facebook.github.io/react-native/docs/getting-started .
2. for UI you will learn flex-box from official documentation.
I thing that is enough
Yes, not just with android but also with iOS using XCode
Yes, you can make real-world mob application with React-Native. React-Native is used to create a hybrid mobile application. In this, we write code in javascript which gets converted to swift for ios and java for android.
Yes, You can build the Android app using React Native. For this, you have to install Android Studio with all the required SDKs. You can run your React Native app in Android simulator by using Android Studio and command line both.
For command line, run the following command:
react-native run-android
Otherwise you can open the android project in Android Studio which is created by React Native in android folder and run the project from there.
Happy Coding.. :)
Yes, you can definitely build android apps using react-native.This is one of the great benefits of React Native. Before Facebook created it, you had to build your app twice and with different code : one for iOS using Swift or Objective-C and one for Android using Java or Kotlin.