Questions tagged [react-native-android]

1

votes
1

answer
87

Views

How to fix "FAILURE: Build failed with an exception.- Could not determine java version from '11.0.1'

I'm new in react-native and this is my first app. I followed the steps here.but once I run the command react-native run-android this error appeared Starting JS server... Building and installing the app on the device (cd android && gradlew.bat installDebug)... FAILURE: Build failed with an excepti...
Eman Fateen
1

votes
1

answer
1.2k

Views

React Native: Invariant Violation: The navigation prop is missing for this navigator

My code is as follows: import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import {LoginNavigator} from './src/components/login/LoginNavigator' import {MainNavigator} from './src/components/main/MainNavigator' import FBSDK from 'react-native-fbsdk'...
Milos
1

votes
1

answer
118

Views

DrawerNavigator - Undefined is a function

When I run my android app on virtual device, It throws an error Undefined is not a function I have tried to replace "AppDrawerNavigator" to "App" in my code, it solved the problem, but created another one 'Duplicate declaration "App"' error in console. Here is my code: import React, {Component} from...
Bosit Sultanov
0

votes
0

answer
6

Views

Logging out to a specific view in react native

I'm a beginner to react native development. At the moment I'm trying to set my navigation for the login logout process. This is my app flow right now Home -> SignIn -> Dashboard. Now when the user clicks the logout button in the dashboard it should go back to Home screen. This works well for the fir...
Gamerlegend
1

votes
2

answer
1.8k

Views

react-native: Picker in Modal not showing

When my Picker is embedded in Modal, it doesn't appear on screen (only tested for android) renderModal() { return ( this.setState({ modalIsVisible: false })} animationType={'fade'}> Choisissez la priorité de cet emplacement this.setState({storagePriority: priority})}> ); } Any suggestion?
soling
1

votes
1

answer
1.4k

Views

How to pass an object back from a React Native Android module to Javascript

React Native's Native Module documentation for Android says that ReadableMap directly maps to a Javascript object. I assume this means that when I pass an object from Javascript to a native module, it is available as a ReadableMap. How do I do the reverse, which is to create a dictionary (mapping st...
Roxy
5

votes
0

answer
183

Views

Play video using base64 encoded string in React-Native

I have encrypted a video file using base64 encoding format and AES-encryption. I decrypt data stream-by-stream and append/write each stream (as a .mp4 file) to achieve the final video but it takes a lot of time to achieve a final output. Major Edit : I have found resources html5-media-and-data-uri...
Ron
0

votes
0

answer
3

Views

Failed to execute 'createObjectURL' in ionic 3

I was using facing issue while open camera using action sheet and getting following error. CameraProxy.js:105 Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. at successCallback (CameraProxy.js:105) my ionic camera version i...
Niraj Gavande
1

votes
3

answer
358

Views

Native Base Radio Color Not Working?

I need to set a custom color for Radio button, here is what i tired : this.props.somefunc() } />
Praz Solver
1

votes
3

answer
39

Views

React Native-Android:

I am still currently developing my simple calculator to know the basics of React Native and also researching online and the original react native documentation and I stumbled upon this problem. my code: {/****** TEXT INPUT CONTAINER ******/} {/****** TEXT INPUT 1 ******/} {/****** TEXT INPUT 2 ****...
jeronnex2 Gador
1

votes
3

answer
50

Views

How to call a parent function from a child - react-native

I'm struggling to find a solution to my problem , but i cannot find it anywhere . So my question is how to call a parent function from a child . The function has to be passed in a onPress={()} inside the child Parent.js constructor(props) { super(props); this.state = { loading: true }; this.state =...
PandaMastr
4

votes
2

answer
220

Views

React Native: Rendering infinite number of pages (bi-directional swiping)

Question How do people implement an infinite number of pages for you to swipe through dynamically? Details If an app renders a page for a day you can expect to swipe to the right for the previous day and to the left for the next day. For example, the FitNotes app does this seemlessly: Swiping to the...
HBSKan
1

votes
2

answer
2.5k

Views

react native google maps alternative

I have a react native project on android. I already installed react-native-maps and all works fine, but I need to run my app on android device without google services (such as TomTom navigator). Is there an alternative to google maps? (bing, openstrett, ecc) Thanks
Mauro Sala
2

votes
0

answer
126

Views

make fragment an UI Component in react-native error

I have a problem when I attempt to make fragment an UI Component. Code below works well when first render in react native, but when the component re-render App will crash due to transaction?.replace(R.id.id_empty_content, EmptyFragment(), "EmptyFragment").The error shows no view for id_empty_content...
Virgil Lee
2

votes
1

answer
255

Views

React-Native Native Android Module - Toast Example

I'm trying to learn to work with android native module and using the toast example in the react-native docs. (https://facebook.github.io/react-native/docs/native-modules-android). However, I am facing an issue where the native module that I was trying to export was unable to be resolved/undefine. My...
Jackelll
2

votes
2

answer
370

Views

React native IllegalViewOperationException - Trying to remove a view index above child count 0 view tag: 1

I found this issue in my App.js which had the following render method:- render() { if (this.state.isDownloading) { return ( ); } return ( ); } I found this issue only on Android released apk, it works fine for iOS. Basically I've used CodePush. So once the code-push downloads and installs the update...
Sujay Naik
6

votes
0

answer
82

Views

How to implement AWS IoT(device) in React-Native?

I am trying to Implement AWS-IoT(device) using React-Native. I have used the packages, 1) aws-iot-device-sdk-js 2) react-native-aws-iot-device-shadows and got a lot of errors while using the package. I could debug few, but did not get expected results. I am Implementing AWS-IoT for Chatting applicat...
megha
5

votes
2

answer
241

Views

Android app crash, finding cause in logcat

I'm posting here for help locating the issue that is causing a React Native Android app to crash. The app uses React Native Navigation. I can't work out which error is causing the app to crash. It crashes as it starts to load its main screen. I removed MultiDex.install since the first comment but s...
Adamski
9

votes
0

answer
72

Views

BackHandler is not working in react-native side-menu when using react-native router-flux

I am working on react-native to develop a sample application. Here I got an issue when I was using backHandler in the react-native side-menu component. Actually, the side menu contains more pages! But when clicking the Android back button in the side menu pages, only once the back handler works. Her...
Lavaraju
1

votes
1

answer
604

Views

React Native - No app-release.apk

I'm trying to generate release apk for my react native app. I'm using react native 0.29. I'm following the instructions in https://facebook.github.io/react-native/docs/signed-apk-android.html Here is the output of my terminal: → cd android && ./gradlew assembleRelease :app:preBuild UP-TO-DATE :app...
Provash Shoumma
1

votes
2

answer
1.9k

Views

How to call a native view method from JavaScript

I have an Android class that extends SimpleViewManager class and encapsulates a MapView. Setting props from React Native JavaScript class works like a charm (using the @ReactProp annotation). However, i'd like to be able to call a method on the view, something like the following: public void centerT...
Honza Kalfus
1

votes
2

answer
994

Views

React-Native List not scrolling

Problem is listview is not scrolling. I tried many styles but I cant find the way. I using React-Native 0.39.2 . I tried on Android Devices /** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet,...
Nazır Dogan
1

votes
2

answer
3.2k

Views

React Native wont run on Android Device. Missing ANDROID_HOME [duplicate]

This question already has an answer here: React Native - java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties 5 answers When I execute react-native run-android in the terminal, I get the following: JS server already running. Running adb -s HT68X02...
Anthony Tietjen
1

votes
2

answer
4.1k

Views
13

votes
4

answer
415

Views

Hide push notification if it contains specific elements

I won't show a received push notification from appearing top notifications menu my notification if it has for example key update. For now if I get notification with this key, all notifications are in the notification bar. I want to not present this notifications for user. I'm using WakefulBroadcastR...
Robson
1

votes
4

answer
764

Views

Loading Old Bundle in React native . While running on Physical device

While trying to run generated build apk or debugging on physical device , It is loading old bundle. and not reflecting any changes, it Happens only with physical device on same network. Following tricks are not working for me. 1. Run the command in a terminal: ps ax | grep react-native Kill all pro...
deva11
2

votes
2

answer
711

Views

React native BUILD SUCCESSFUL, But App crashes immediately after showing splash screen

After I upgrade my project from react native v 0.36.0 to 0.47.1 and resolved all the conflicts and upgraded other third party modules too, when trying to run the command react-native run-android it got success, but my app is crashing at Launching. I looked for any repeating third party libraries but...
Dinith Minura
2

votes
1

answer
473

Views

React Native Maps - Smooth Movement of Marker from one coordinate to another

I am making an tracking app with RN 0.50.1, and using react-native-maps for showing user location on maps with custom image on MapView.Marker "image" props. The location works fine, also the tracking works fine but the problem is the marker jumps from one co-ordinate to another on lat long change. H...
Krunal Panchal
2

votes
2

answer
465

Views

handle network request failed in react native

I'm facing an issue while using react native fetch api. many times request got failure . I have a high speed connection. but many times it got failed. that issue is happening In android,ios both. const shoppingApi = 'myserverlink'; async function Sendshoppinapi(data) { try { let response = await fe...
Tanveerbyn
2

votes
0

answer
62

Views

Android Webview onHideCustomView when orientation changed

I meet a strange issue. I have a app which had a webview to display some articles. These articles had texts, images and videos, and this webview support playing videos in fullscreen. This is the code of onShowCustomView and onHideCustomView. It works very well until Android 8.1. @Override public vo...
Cheng
2

votes
1

answer
24

Views

React Native Flatlist Scroll issue

I am new to react native. i am using flatlist for loading 10000 items. i am using lazy loading for getting items. problem is when i rendered more items and i tried to scroll to upper direction, it scrolls before rendering the items. is there any solution..? or can we controll the speed of the scroll...
Anant kamat
17

votes
4

answer
3.3k

Views

Is React Native's LayoutAnimation supported on Android?

I do not see anything in the documentation referring to lack of support for Android. I'm using a simple preset animation: LayoutAnimation.configureNext(LayoutAnimation.Presets.spring); It works in iOS, but in Android it makes the transition without any spring animation.
nomad
17

votes
2

answer
9k

Views

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 the render function is called. When i try to press...
Sijan Shrestha
18

votes
2

answer
415

Views

React-native app is being restarted on every navigation when integrated with native app

We're trying to integrate a new React Native app to an existing native Android app. Following the RN official docs we managed to get it working but with some issues regarding the navigation. We've native and non-native (JS) screens, and we need a good way to navigate between all screens regardless i...
usef_ksa
18

votes
3

answer
205

Views

React native android deploy files to server

I am new to React Native I want to know how is it possible to deploy react native part or code like javascript files and assets on server and then use it. Currently it is showing as localhost Please let me know how to deploy it on server also is it possible or not. Do I need to update app on play st...
apk
2

votes
1

answer
77

Views

React Native import audio file from android res

I'm making an Android-only React Native app displaying audio files using react-native-sound, which works well given its Sound.MAIN_BUNDLE feature. For a new sharing feature I need to access my audio files, which are located in the android/app/src/main/res/raw folder. I plan to use react-native-share...
Antoine Auffray
18

votes
3

answer
17.9k

Views

How to build .ipa application for react-native-ios?

I would try "How to generate .ipa file for react-native?" But I'cant get .ipa file. Any one cloud you explain how to get .ipa file .
Saravana Kumar
2

votes
2

answer
99

Views

31.0.0 is not a valid SDK Version. Option are 26.0.0 Unversioned

I can no longer run my app after updating expo version to 31.0.0. I needed this upgrade to do due iOS version 12 support. Thou after trying to build the Android app it is no longer working. my package.json looks as below: { "name": "myapp", "version": "0.1.0", "private": true, "devDependencies": { "...
Mizlul
18

votes
2

answer
9.7k

Views

React native Android ScrollView scrollTo not working

I am trying to use a horizontal ScrollView in React Native for Android, where the starting position is in the middle of the scrolling images rather than (0,0). The scrollTo method seems to be called correctly inside componentDidMount but nothing moves in the application, it still shows as starting...
Rob M
6

votes
3

answer
2k

Views

Wrapping text around an image with React-Native

I try to create a View with an Image and a Text component that wraps around the Image component. My styling: textContainer: { flexDirection: 'row', }, text: { flex: 10, }, image: { flex:1, height: 180, width: 150, margin: 10, borderColor: '#ccc', borderWidth: 1, } My component: {this.props.con...
Timvp

View additional questions