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
Related
My name is fernando and I'm studying mobile development via React Native
I'm having trouble using the React Native CLI, as I couldn't solve this problem I decided to do all the steps from the recommended https://reactnative.dev/docs/environment-setup again to run the code.
I uninstalled Java, node, Android Studio, JDK and gradle.
I installed Java, Node and Java using Chocolatey as recommended by the documentation, I strictly performed all the steps requested but I cannot install the application on the simulator or on the cell phone via USB
Starts NPM START normally without errors.
But when starting NPM RUN ANDROID it gives me the following error
enter image description here
OBS:
The project in question in the image, has no code, it was only opened using npx react-native init AwesomeProject
Another observation that I can run and program using React native EXPO GO
It works without errors and I can run both in the simulator and in USB
Thank you and I would appreciate it if someone could help me
So I built an android app using flutter on Android studio but I see that in order to build an IPA I need to use Xcode on a MAC device so I was really wondering what to do to transfer the flutter app to Xcode? or do I need to rewrite the whole code again?
I tried using a ci/cd service too it would build the app in .app format but would never install on my IOS device, I followed another procedure to transfer .app to .ipa but still it can't be installed so I'd be really grateful if someone could give me an insight on what to do at least
thanks in advance
Flutter can directly compile an iOS and Android version. You do not need to rewrite anything(unless you have Android native code in your App). Just open your Project on a Mac with Flutter and Xcode installed and compile it by running flutter build ios.
You won't be able to do anything without a Mac though. Since Xcode is required to sign your App and Apple doesn't let you do that on any other OS.
I have an Android app built from scratch using React Native. Can I migrate the same app to iOS? If so, how tough will it be?
The Android app is already built and working fine.
If the app is done in React Native, you could build it using Xcode, of course you need a Mac, https://facebook.github.io/react-native/docs/getting-started#xcode.
You can also try from command line
react-native run-ios
Remember that you still need to install Xcode and the tools needed to build on the simulator or your device.
Also remember that you might have to do some changes in your code, not always the code for android works in iOS, moreover if you are using native modules done by you or from a library.
A project written in react-native should, by default, work on iOS.
Normally tho, every package you have used, some styles still differs from each other from platform, some things are avaiable to do on Android and not on iOS, some things are avaiable on iOS and not on Android.
Some packages needs linking. Some needs additional steps to run on iOS changing some datas/informations using xcode. (like deep linking).
On react-native 0.60 you need to install the pods manually as it's not done by the autolinking, there are a lot things to check and it may not be automatic for the majority of the cases
Everyone.
I'm developing React Native lately.
I've successfully created a android app sample as installation guide:
https://facebook.github.io/react-native/docs/getting-started.html
but the Hot Reloading function is not working for me...
so it's not really convenient to develop something.
I don't have mac to test React Native and my development environment is based on Windows 7, android studio(Android SDK, JDK1.8), HTC one(Android 5.0.2)
Is it the reason react-native start server not firing when index.android.js file changed?
or some plugin I should add in the project? like webpack or watchman..
thanks!
Installing the latest NodeJS Long Term Support release (6.10.x) should fix this issue.
As I can see here you need OS X to build apps with React Native. That is probably because they used it at first to create only iOS apps. Now it's possible to create Android apps with React Native but they still require OS X as development platform which doesn't make sense to me. Is there any way to create Android apps using React Native on Ubuntu OS or any other Linux?
Update 2: I've been developing React native apps on Ubuntu for some time now, without any issues.
Update 1: It's almost possible on linux and windows now. Check this doc page: link
Old answer:
It's already almost working, from the issue shared in kzzzf's answer:
Everything works on Linux except:
react-native run-android can't open a new shell window, you need to
use react-native start. Will be fixed in next release. Debugging in
Chrome currently relies on an AppleScript to launch Chrome. There's a
PR to replace that.
Building on linux and windows is not officially supported although there are people in the community already sending pull requests that will allow to do so (main obstacle is the fact of using apple-script and calling to shell scripts from node - from react-packager and from react-cli).
Main task for tracking those efforts is here: https://github.com/facebook/react-native/issues/2693
While it's not officially supported on Linux yet, and there are certainly some hoops to jump through, I have created a docker container that allows me to build and run android apps from Ubuntu.
The dockerfile is still a work in progress but it's available on github: https://github.com/gilesp/docker/tree/master/react_native
There's a couple of shell scripts to make local development easier - I mainly use the react-bash script to give me a shell prompt in the container for running react-native run-android etc.
It works well enough that I can have a phone connected via USB on my host machine, the react native stuff running in the container and have my edits to the code (I mainly edit using emacs on the host) appear immediately on the device.
I'm currently working on CI builds for android as there are some more hoops to jump through to create the bundled version of the javascript for deployment.
It should be possible by now. For an up to date guide on "can i build for platform X on system Y", see:
https://facebook.github.io/react-native/docs/getting-started.html