Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
596 votes
35 answers
580k views

React Native android build failed. SDK location not found

I have error when i start running android What went wrong: A problem occurred evaluating project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or ...
Pyae Sone Nyein's user avatar
426 votes
56 answers
439k views

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 ...
Goba's user avatar
  • 4,405
365 votes
6 answers
202k views

What are my options for storing data when using React Native? (iOS and Android) [closed]

I am still new in the React Native world, and generally in the mobile/native world as well, and I am finding the documentation a bit lacking when it comes to data persistence. What are my options for ...
Sia's user avatar
  • 9,144
347 votes
51 answers
333k views

How do you debug React Native?

How does one debug their React code with React Native while the app is running in app simulator?
McG's user avatar
  • 4,959
328 votes
22 answers
561k views

How can I generate an apk that can run without server with react-native?

I've built my app, I can run it on my local emulator (and also on my android device within the same network by changing debug server). However, I want to build an APK that I can send to someone ...
Gokhan Sari's user avatar
  • 7,722
296 votes
14 answers
187k views

How do I "shake" an Android device within the Android emulator to bring up the dev menu to debug my React Native app

I am working on a cross-platform React Native mobile app. I am writing console.log statements as I develop. I want to see these logging statements in Chrome while I'm running the Android app in the ...
Austin's user avatar
  • 6,519
286 votes
31 answers
270k views

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 ...
mllm's user avatar
  • 17.2k
219 votes
19 answers
284k views

Build and Install unsigned apk on device without the development server?

As I am new in react-native so if there is anything wrong in steps let me know. I have build a react native android app using the command as per documentation react-native android while running ...
kAy_4337270's user avatar
  • 2,471
214 votes
22 answers
436k views

react-native: command not found

I am getting -bash: react-native: command not found error while creating a react-native project. Below are the additional info 1. brew --version homebrew 0.9.9 2 brew info watchman watchman `...
Ashok R's user avatar
  • 20.5k
212 votes
39 answers
179k views

error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app

Trying to create a react-native project on Android 4.4.2 I get this error screen and couldn't find any way to resolve it. I tried restarting packager, reconnecting device, even reinstalling react ...
Zygro's user avatar
  • 7,059
208 votes
26 answers
138k views

Android failed to load JS bundle

I'm trying to run AwesomeProject on my Nexus5 (android 5.1.1). I'm able to build the project and install it on the device. But when I run it, I got a red screen saying Unable to download JS bundle. ...
Matthew's user avatar
  • 5,065
194 votes
33 answers
434k views

Generate SHA-1 for Flutter/React-Native/Android-Native app

I'm trying to generate a SHA-1 for a Flutter app, for Android studio to support Google Sign in, but I don't know how to do that, I saw some posts that indicate to run a command, but there I need a jks ...
Joseph Arriaza's user avatar
193 votes
29 answers
267k views

Package signatures do not match the previously installed version

This my project: https://github.com/kenpeter/my_hak_news, which is a direct copy of https://github.com/grigio/HAgnostic-News. Git clone https://github.com/kenpeter/my_hak_news, then run react-native ...
kenpeter's user avatar
  • 7,940
184 votes
24 answers
164k views

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 /...
Anandu Viswan's user avatar
177 votes
26 answers
661k views

How to clear react-native cache?

In react-native development, there are multiple caches used when the app is built: React-native packager cache Emulator cache Java side cache (.gradle) folder (only in android) npm cache (if relevant?...
Ville Miekk-oja's user avatar
174 votes
13 answers
89k views

React-Native, Android, Genymotion: ADB server didn't ACK

I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation: ... 04:54:40 E/adb: error: could not install *...
Paul's user avatar
  • 7,167
169 votes
32 answers
179k views

React Native on Android: Cannot run program "node": error=2, No such file or directory

EDIT: I am uncertain which steps I took to resolve this problem, and am no longer seeing this error message so I cannot test the solutions below. Please try them individually as different answers seem ...
Steve C's user avatar
  • 1,746
166 votes
42 answers
308k views

Could not connect to React Native development server on Android

When I run react-native run-android, it gives me the following error: Could not connect to development server Package server is running and I can access it directly from browser on my mobile ...
cityvoice's user avatar
  • 2,581
161 votes
18 answers
137k views

Unable to connect with remote debugger

I'm using React.JS and when I do react-native run-android (with my device plugged in) I see a blank page. When I shake the device and select Debug JS Remotely from the option list I see the following ...
splunk's user avatar
  • 6,667
161 votes
14 answers
59k views

Can I build Android apps with react native?

The recently launched react native features just iOS app example and docs.
ieugen's user avatar
  • 2,305
160 votes
30 answers
298k views

React-Native: Module AppRegistry is not a registered callable module

I'm currently trying to get the ES6 react-native-webpack-server running on an Android emulator. The difference is I've upgraded my package.json and build.grade to use react 0.18.0, and am getting this ...
Dustin's user avatar
  • 6,307
157 votes
9 answers
164k views

How to update version number of react native app

I am using React native with Android. How can I update version number in the app? As I am getting this error. I am generating file as per this url https://facebook.github.io/react-native/docs/signed-...
Praveen Prasad's user avatar
151 votes
4 answers
228k views

Open Url in default web browser

I am new in react-native and i want to open url in default browser like Chrome in Android and iPhone both. We open url via intent in Android same like functionality i want to achieve. I have search ...
Mohit Suthar's user avatar
  • 9,205
148 votes
7 answers
116k views

Cannot add task 'wrapper' as a task with that name already exists

When installing 'react-native init AwesomeProject' I get this error when I run react-native run-android: Could not determine java version from '11.0.1'. A quick google suggests I need to update the ...
Ben Kemp's user avatar
  • 1,511
147 votes
40 answers
106k views

Resource linking fails on lStar

I'm working on a React Native application. My Android builds began to fail in the CI environment (and locally) without any changes. Execution failed for task ':app:processDevelopmentDebugResources'. &...
Eduardo Carminati's user avatar
140 votes
47 answers
292k views

Error:(23, 17) Failed to resolve: junit:junit:4.12

Why is it that every time I create a new project in Android Studio, it always comes up with: Error:(23, 17) Failed to resolve: junit:junit:4.12? When I remove testCompile 'junit:junit:4.12' in ...
fathurzero's user avatar
  • 1,486
139 votes
16 answers
231k views

Failed to find Build Tools revision 23.0.1

I am trying to build my first app with react-native. I am following these 2 tutorial: https://facebook.github.io/react-native/docs/getting-started.html#content https://facebook.github.io/react-...
Polo D. Vargas's user avatar
129 votes
25 answers
88k views

React-Native :java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so

I have just updated my project to use react-native version 0.60.2 . But when I am trying to run an application on Android device it gets crashed after launch screen. I got the following error logs : ...
V-Xtreme's user avatar
  • 7,318
124 votes
17 answers
169k views

React Native Android Fetch failing on connection to local API

I'm using the fetch API in my react-native Android app to make requests to a local API. I usually query said API from react web apps at http://localhost:8163. I'm testing my app on my physical device ...
seanchen1991's user avatar
  • 1,395
123 votes
9 answers
113k views

How to enable live reload in react native on android?

How can I enable live reload in the android emulator? The documentation for android wasn't very helpful for a android noob.
Kenneth Lynne's user avatar
122 votes
36 answers
266k views

How to get current route name in react-navigation?

I want the name of the current route or screen in react-navigation which I want to use inside if condition to make some changes.
Eshant Bist's user avatar
  • 1,585
118 votes
10 answers
217k views

Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

I've setup the environment for react native on Windows. But when I run the command react-native run-android I get the following errors - * What went wrong: A problem occurred configuring project ':...
Paul Santosh's user avatar
  • 1,181
116 votes
23 answers
363k views

React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH

I've followed step by step the official Getting Started. I started from a clean linux install and installed everything required as per the "Building Projects with Native Code" tab. I have also read ...
Mister Smith's user avatar
  • 27.9k
111 votes
14 answers
215k views

error: package com.android.annotations does not exist

I have the following class import com.android.annotations.NonNullByDefault; @NonNullByDefault public final class Log { ... } and here is my build.gradle file (some parts omitted) apply plugin: ...
Adam's user avatar
  • 2,097
108 votes
12 answers
131k views

How to get a versionName in react-native app on Android?

I've made a timestamped versionName in build.gradle like 20150707.1125. I want to show the version of the package in react-native app in about window. How I could get versionName in code?
usego's user avatar
  • 1,083
107 votes
16 answers
159k views

React Native iOS and Android folders not present

I'm new to react native, and I've been having some trouble understanding the folder structure of the app which should supposedly be present in the project folder on creation. Basically, when creating ...
Simon Eliasson's user avatar
104 votes
37 answers
336k views

react-native :app:installDebug FAILED

Install APK debug to my device failed. jianglinghuadeMacBook-Pro:hello jianglinghua$ react-native run-android JS server already running. Building and installing the app on the device (cd android &...
江玲华's user avatar
  • 1,041
101 votes
16 answers
175k views

React Native adb reverse ENOENT

I am trying to get React-Native to work with Android V4.2.2 (Genymotion) but I am unable to test the app on the Emulator. When I ran react-native run-android, I get this error Could not run adb ...
XPLOT1ON's user avatar
  • 3,164
94 votes
30 answers
68k views

Error type 3. Activity class {com.awesome_project/ com.awesome_project.MainActivity} does not exist in react native (Android device)

I've created the project using the following command. react-native init Awesome_Project I've started the packager using the following command. react-native start I've connected my Android mobile ...
Srujan Chowdary Panda's user avatar
91 votes
9 answers
66k views

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's user avatar
  • 1,165
91 votes
11 answers
45k views

React Native on Android failed to find Build Tools

What causes following problem? Is my Android SDK Version not supported? Starting JS server... Building and installing the app on ...
Łukasz Rzeszotarski's user avatar
91 votes
6 answers
50k views

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 ...
unlimited101's user avatar
  • 3,753
90 votes
11 answers
131k views

How to find height of status bar in Android through React Native?

How can I find the height of the status bar on Android through React Native? If I check the React.Dimensions height the value seems to include the status bar height too but I'm trying to find the ...
Zohar Levin's user avatar
  • 2,424
86 votes
24 answers
137k views

How to use SafeAreaView for Android notch devices?

I'm developing an app with React Native and I'm testing with my OnePlus 6 and it has a notch. The SafeAreaView is a solution for the iPhone X but for Android, it seems there is no solution. How to ...
Thomas Desdoits's user avatar
86 votes
4 answers
40k views

Save sensitive data in React Native

I am building a React Native application and I need to save some sensitive data like a token and a refresh token. The obvious solution is to save that information using AsyncStorage. The problem is ...
Sandro Machado's user avatar
86 votes
10 answers
150k views

How to change styling of TextInput placeholder in React Native?

Is there a way to set fontStyle: 'italic' only for the placeholder of the TextInput in React Native? looking here at the documentation seems like you can only set a placeholder and ...
Zohar Levin's user avatar
  • 2,424
83 votes
29 answers
170k views

"Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?"

How can I solve this error? Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin? This is my babel.config.js file : module.exports = { presets: ['module:metro-...
Ajay Pandey's user avatar
79 votes
7 answers
106k views

Build Gradle Error Could not get unknown property 'compile'

i have react native porject when run android this error showed Build file 'C:\dev\icnet_final\android\app\build.gradle' line: 213 A problem occurred evaluating project ':app'. Could not get unknown ...
Mehrad Farahnak's user avatar
78 votes
38 answers
223k views

react-native run-android is unrecognized

I've installed react-native-cli globally: npm install -g react-native-cli Then run: react-native init AwesomeProject cd AwesomeProject I got the following structure: -- ...
Sergey Onishchenko's user avatar
76 votes
6 answers
54k views

How to change display name of an app in react-native

Apple have clear instructions on how to change the display name of an IOS app, but they are not useful for a react-native app because the folder structure is different. How do you change the display ...
Obromios's user avatar
  • 16.1k

1
2 3 4 5
388