Questions tagged [react-native-android]

React-native-android: refers everything related to react-native Android development. Component, Styling, Routing and Native API access in react-native Android.

React-native is a library that enables Android device applications to be written in rather than . When necessary you can fall back to .

6950 questions
377
votes
49 answers

Unable to load script from assets index.android.bundle on windows

I'm trying to run my first React Native project for first time on my device (Android 4.2.2). And I get: unable to load script from assets index.android.bundle Commands that I used: cd (project directory) react-native start react-native…
Goba
  • 3,916
  • 3
  • 9
  • 11
254
votes
9 answers

What is the difference between Expo and React Native?

From the Expo website Expo lets web developers build truly native apps that work across both iOS and Android by writing them once in just JavaScript. Isn't this what React Native does? What's the difference?
249
votes
45 answers

React Native version mismatch

Getting the following message when I init a new project and then launch the Xcode emulator: React-Native Version Mismatch Javascript Version 0.50.1 Native version: 0.50.0 Make sure you have rebuilt the native code. ... Does anyone know what is…
Sam Rao
  • 3,511
  • 4
  • 15
  • 21
220
votes
23 answers

Change package name for Android in React Native

I used react-native init MyApp to initialise a new React Native app. This created among others an Android project with the package com.myapp. What's the best way to change this package name, for example to: com.mycompany.myapp? I tried changing it…
mllm
  • 15,275
  • 14
  • 44
  • 58
201
votes
45 answers

Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release

react-native run-android command terminates by leaving a message in android simulator. The message is as follows: Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly…
145
votes
21 answers

How to resolve the error on 'react-native start'

I just installed node.js & cli installed node.js installed react-native-cli npm -g react-native-cli And created a 'new project'. react-native init new_project and inside that 'new_project' directory, I tired to see if metro bundler works…
131
votes
7 answers

React Native: View onPress does not work

I'm facing a weird problem. In my react native app, if I set onPress event to View it is not triggered but if I set the same to Text inside View, it fires. What am I missing here?
mehulmpt
  • 13,725
  • 12
  • 41
  • 79
93
votes
37 answers

React native: Android project not found. Maybe run react-native android first?

I had an issue in my React-Native project which was working fine earlier but suddenly it stopped working. Whenever I used the command: react-native run-android I was getting an error: Android project not found. Maybe run react-native android…
udai
  • 3,247
  • 3
  • 11
  • 20
85
votes
12 answers

How to launch and open email client React-native?

I do not want to compose an email. I just want to be able to launch the main email app on a user's device (iOS& Android) from a react-native app. Scenario: I will send a verification email to the user upon signup.
jasan
  • 8,391
  • 16
  • 45
  • 90
82
votes
9 answers

How to disable landscape mode in React Native Android dev mode?

I am new to android environment. I know iOS can be done in Xcode to disable device orientation. How can I disable landscape mode or any orientation mode in React Native Android? Thanks.
sungl
  • 1,005
  • 1
  • 7
  • 15
80
votes
5 answers

How do I make text bold, italic, or underline in React Native?

Surprisingly there isn't one question that groups these all together yet on Stack Overflow; there hasn't been an answer on SO for italics or underline, in fact, only this question for bold. I self-answered this quesiton below.
74
votes
5 answers

React Native onPress being called automatically

I am having trouble with react-native onPress Feature. The onPress should only work when it is actually been triggered by a touch event (i suppose) , that is when i press the button on the screen. But it seems the onPress gets triggered itself when…
Sijan Shrestha
  • 1,716
  • 7
  • 20
  • 42
73
votes
13 answers

Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation

FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-linear-gradient:compileDebugJavaWithJavac'. > Could not find tools.jar. Please check that /Library/Internet…
Anandu Viswan
  • 733
  • 1
  • 2
  • 4
73
votes
8 answers

Reload a React Native app on an Android device manually via command line

I'd like to manually force a Reload of my React Native app on demand without physically shaking the device. (I'm getting carpal tunnel.) I know that Live Reload / Hot Reload are available. I'm looking for a on-demand command line solution.
brettlaforge
  • 2,841
  • 2
  • 14
  • 13
70
votes
6 answers

Does React Native compile JavaScript into Java for Android?

When I develop hybrid apps with React Native. Does the JavaScript code I write transform into Java-Code or Java-Bytecode for the Dalvik/ART Runtime when I create an Android-App from my React Native code? Or are just the UI components compiled into…
unlimited101
  • 3,251
  • 4
  • 19
  • 35
1
2 3
99 100