Questions tagged [react-android]

102 questions
1
vote
1 answer

react-native-view-shot: NativeModules.RNViewShot is undefined. Make sure the library is linked on the native side

I'm trying to capture View in react native but got the NativeModules.RNViewShot is undefined error. Things I've tried Manual Linking Restart/rebuild project Deleted node modules Downgrade package version If there is any other alternative of…
1
vote
3 answers

Positioning a image over text

I'm trying to position an image over text in a view. Im trying to position it like this: Im just having a bit of trouble centering the image in the view. Here is the code:
mick1996
  • 516
  • 9
  • 31
1
vote
2 answers

Not listing the files using rn fetch blob in react native [Error: Attempt to get length of null array]

I was trying to list all the files in a folder using rn fetch blob in react native. When i tried to list it i am getting an error saying [Error: Attempt to get length of null array] here is the below code I have tried to list the files. try { …
Thomas James
  • 187
  • 2
  • 16
1
vote
0 answers

how to fix " Could not find com.android.tools.build:gradle:3.4.1

I'm new in react native, when i wanted to run my first project, i got this error, how to fix it, thanks for your attentions " Could not find com.android.tools.build:gradle:3.4.1. Searched in the following locations: this and…
1
vote
0 answers

Head up notifications are not showing in react android

I’m trying to listen for data messages. At the moment, I’ve implemented the Headless JS functionality but I’m not receiving the notification on these two cases (background and closed). But notification receiving when the app in the foreground, but…
bablu s nair
  • 49
  • 1
  • 5
1
vote
1 answer

React native reload bundle programmatically

I want to develop a react native app. But js files aren't on my local machine. I will download bundle from remote server. Below code works for now. But how can I reload js bundle from file path? public class MainApplication extends Application…
zakjma
  • 2,030
  • 12
  • 40
  • 81
1
vote
1 answer

Could not invoke RNFirebaseFirestore.collectionOnSnapshot null Failed

I have below config app/build.gradle implementation project(':react-native-firebase') implementation "com.google.firebase:firebase-auth:11.+" implementation "com.google.firebase:firebase-core:11.+" implementation…
1
vote
2 answers

React-Native How to show alert after an async function is complete?

I have the following code which is not working to show an alert after my async function ends. { new BaseService().request( serviceURL, "POST", headerParams, bodyParams, serverResponse => { this.setState({ isLoading: true…
Krupal Ghorpade
  • 137
  • 1
  • 15
1
vote
2 answers

react native ANDROID_HOME environment variable setup

I am getting the below error on 'react-native run-android'.. how to fix it? FAILURE: Build failed with an exception. What went wrong: **A problem occurred configuring project ':app'. SDK location not found. Define location with sdk.dir in the…
1
vote
1 answer

Scaling issue causing inconsistent looks for react-native app

A newbie to react-native. I have been given a design prototype referencing an iPhone 6. So, when I make a view of 320*50px it looks exactly like the prototype but on the iPhone 5s it looks too large and inconsistent. Similar issue for the images.…
Surily
  • 121
  • 2
  • 10
1
vote
0 answers

Swiping of ListView will go to another ListView

I have two JSON files. I want that if user swipes on one listView, the data for that is coming from 1st JSON file, he/she will be redirected to another ListView, the data for that is coming from 2nd JSON File. Below is the structure of my JSON file…
Anjali
  • 2,540
  • 7
  • 37
  • 77
1
vote
0 answers

accessing this.props.navigation.state.params ouside render

I am passing a parameter from ListView to a detailed page. Can I access this parameter outside the render on my detailed page: Below is my code to pass the parameter:
Anjali
  • 2,540
  • 7
  • 37
  • 77
1
vote
1 answer

getting an error No ViewManager defined for class RCTRawText

I am trying to use geolocation.getcurrentposition and I am getting an error. Below is the screen shot of the error: below is my App.Js code: import React, { Component } from 'react'; import { View, Text } from 'react-native'; class…
Anjali
  • 2,540
  • 7
  • 37
  • 77
1
vote
0 answers

Says "package ... does not exist" despite its JAR is inserted

I've built Fresco and copied the created *.jar packages into libs folder that is placed in the root directory of ReactAndroid project like the following: directory setup: - node_modules - ReactAndroid - libs - drawee-1.3.0-sources.jar …
efkan
  • 12,991
  • 6
  • 73
  • 106
1
vote
1 answer

Cannot "open" notification that is received when the app is in background

i have a problem when i want to process notification that is received when the app is in the background. I do receive the notification, when i click on the notification, the app opens however the FCM.on method is not executed at all, it seems it…
Proxy
  • 1,118
  • 2
  • 10
  • 27