Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 28480 articles
Browse latest View live

React Native: ViewManager for tag could not be found

$
0
0

We are getting several of the following errors when running logcat in our React Native Android app. Intially they seem harmless and they doesn't crash the app. However, if possible I'd like to get some guidance on how to debug them to understand what's going on.

Unable to update properties for view tag 323com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 323 could not be found. View already dropped? false.Last index 0 in last 100 views[I@1eeace9   at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:112)   at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:135)   at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:309)   at com.facebook.react.uimanager.UIManagerModule.synchronouslyUpdateViewOnUIThread(UIManagerModule.java:396)   at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:94)   at com.facebook.react.animated.NativeAnimatedNodesManager.updateNodes(NativeAnimatedNodesManager.java:544)   at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:453)   at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:100)   at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)   at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)   at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:965)   at android.view.Choreographer.doCallbacks(Choreographer.java:791)   at android.view.Choreographer.doFrame(Choreographer.java:722)   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)   at android.os.Handler.handleCallback(Handler.java:883)   at android.os.Handler.dispatchMessage(Handler.java:100)   at android.os.Looper.loop(Looper.java:214)   at android.app.ActivityThread.main(ActivityThread.java:7356)   at java.lang.reflect.Method.invoke(Native Method)   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

EDIT: Just for reference we are using react-native 0.60.5, react-navigation 3.13.0 and react-native-paper 3.10.1. Also, we see these errors when we first open the app.

Thanks!


Android Studio - Gradle "Sync now" is not Available

$
0
0

I am not sure if I need to start my project from the gradle file or not but I am following the instructions for setting up a React Native starter kit as well as the manual way https://rnfirebase.io/docs/v5.x.x/installation/basic-kit and I am not seeing the "Sync Now" alert. I am also not seeing the button to sync the files nor am I seeing anything in the drop downs to sync.

Because my files are not synced I am unable to run the project or able to connect to firebase

Do I need to CD into a different folder before I open the project in Android Studio? Do I need to set the root folder? Not sure where I am going wrong with these gradle files....

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Does anyone grpc with react native in 2020?

$
0
0

Does anyone use grpc with react native? I found some solutions with limitations. It is possible to make full grpc to be used on android an iOS with streaming and all features but as react native module?

react-native-background-timer inconsistently works on Android for recording audio

$
0
0

I am using BackgroundTimer from react-native-background-timer in a React native project for Android.

I want a user to be able to record audio after a set duration (e.g. record for 5 minutes after 30 minutes).

The issue I have is that it works "sometimes". It seems the OS is often killing the process - especially if the time to execute is longer.

Code extract:

import BackgroundTimer from 'react-native-background-timer';...// Start a timer that runs once after X millisecondsconst timeout1 = BackgroundTimer.setTimeout(() => {    // Should work when when app is the the background    this.onStartRecord();    const timeout2 = BackgroundTimer.setTimeout(() => {        this.onStopRecord();        BackgroundTimer.clearTimeout(timeout2);    }, millisRecording);    // Clear first timeout    BackgroundTimer.clearTimeout(timeout1);}, millisUntilRecordMoment);

Thes rest of the code is here: https://github.com/bentaly/listen/blob/master/App.tsx

I have also tried building this in Expo previously which didn't work.

Is there anyway to guarantee this operation will work?

Debug react native debug APK in browser?

$
0
0

I have a debug-APK which uses react native. Is it possible for me to debug that in the browser so that I am able to see which line of JS code is executing at any given time? I also have the source code if required.

Could not load exp:// Something went wrong

$
0
0

I have created a project using Expo XDE. I checked this Can't load expo app: Something went wrong but I have already enabled "Draw over other apps". It works https://expo.io/@ajaysaini/first-proj when I scan this QR code but it doesn't when I run it on android device from XDE.

main.js

import Expo from 'expo';import React from 'react';import { StyleSheet, Text, View } from 'react-native';class App extends React.Component {  render() {    return (<View style={styles.container}><Text>Updating!</Text></View>    );  }}const styles = StyleSheet.create({  container: {    flex: 1,    backgroundColor: '#fff',    alignItems: 'center',    justifyContent: 'center',  },});Expo.registerRootComponent(App);

When I am running it on device it shows below error on android device. I tried restart in XDE multiple times but it didn't help me.

enter image description here

Dependency graph loaded.11:19:21 AMStarting React Native packager...11:19:24 AMScanning 528 folders for symlinks in D:\Expo\first-proj\first-proj\node_modules (18ms)11:19:24 AMLoading dependency graph.11:19:24 AMRunning packager on port 19001.11:19:25 AM11:19:33 AMProject opened! You can now use the "Share" or "Device" buttons to view your project.11:19:44 AMOpening on Android device11:19:54 AMDependency graph loaded.11:21:41 AMOpening on Android device11:23:31 AMOpening on Android device

Error:

There was an unhandled error: Could not load exp://Stack Trace:

Can anyone help me what is going wrong ?

React Native & Socket.io - cannot establish connection between app and server

$
0
0

I am building a chat app for android using React Native& Socket.io.The issue is that I can't establish a connection between the app and the server. It gives me connection error saying Websocket Error.

I tried changing the App Socket Io uri to localhost:port (this gives transport error or timeout error), ip:port (this gives Websocket error), set diff options. Then tried using require syntaxes instead of import for the server. Then installed older versions React-native and socket.io& socket.io-client, still no luck! Then found an app repo from github, installed it and tried running the app. same error. Also changed cleartextTrafficPermitted="true" in Android manifest file.

Node: v12.13.0

Testing on an external devices:

  • Moto E3(1s gen)-Android 6 Marshmallow.
  • Redmi Note 7 pro-Android 9 Pie

screenshot

SERVER:

    import express, { Application } from 'express';    import { createServer } from 'http';    import { listen, Server } from 'socket.io';    // set port number    const port = 7777;    // set express    const app: Application = express();    // set express server    const server = createServer(app);    // listen express server updates on socket.io    const io: Server = listen(server, {        transports: ['websocket'],        serveClient: false,    });    io.on('connection', (socket) => {        console.log('connection is made');        socket.emit('commEvent', { data: 'connectionSuccessful' });        socket.on('disconnect', () => {            console.log('connection disconnected');        });        socket.on('new-message', (data) => {            console.log(data.message);        });    });    // listen server updates on specified port    server.listen(port, () => {        console.log('Message app server listening on port:', port);    });

SERVER:package.json

{"name": "message_app","version": "1.0.0","description": "Message app server.","main": "index.js","scripts": {"start": "node build/index.js","watch": "nodemon src/index.ts","test": "none","build": "npm run lint && tsc-p","lint": "eslint --fix --ext .ts ."  },"dependencies": {"express": "^4.17.1","socket.io": "^2.3.0"  },"devDependencies": {"@types/express": "^4.17.6","@types/socket.io": "^2.1.8","@typescript-eslint/eslint-plugin": "^3.3.0","@typescript-eslint/parser": "^3.3.0","eslint": "^7.2.0","eslint-config-prettier": "^6.11.0","eslint-plugin-prettier": "^3.1.4","nodemon": "^2.0.4","prettier": "^2.0.5","ts-node": "^8.10.2","typescript": "^3.9.5"  }}

APP:

import React, {useEffect} from 'react';import {AppScreenStackNavProps} from '../../../Routes/App/AppRouteTypes';import {View} from 'react-native';import HomeRoutes from '../../../Routes/Home/HomeRoute';import io from 'socket.io-client';export const socket = io('http://192.168.1.38:7777', {  transports: ['websocket'],  jsonp: false,});socket.on('commEvent', (data: {data: string}) => {  console.warn(data.data);});const HomeScreen = ({navigation}: AppScreenStackNavProps<'Home'>) => {  navigation.setOptions({    headerShown: false,  });  useEffect(() => {    socket.connect();    socket.on('connect', (con: any) => {      console.debug('SOCKET: connected to socket server', con);    });    socket.on('error', (err: any) => {      console.debug('SOCKET: errors ', err);    });    socket.on('connect_error', (err: any) => {      console.debug('SOCKET: connect_error ---> ', err);    });  }, []);  return (<><View style={{flex: 1}}><HomeRoutes /></View></>  );};export default HomeScreen;

APP:package.json

{"name": "message_app","version": "1.0.0","description": "Message app server.","main": "index.js","scripts": {"start": "node build/index.js","watch": "nodemon src/index.ts","test": "none","build": "npm run lint && tsc-p","lint": "eslint --fix --ext .ts ."  },"dependencies": {"express": "^4.17.1","socket.io": "^2.3.0"  },"devDependencies": {"@types/express": "^4.17.6","@types/socket.io": "^2.1.8","@typescript-eslint/eslint-plugin": "^3.3.0","@typescript-eslint/parser": "^3.3.0","eslint": "^7.2.0","eslint-config-prettier": "^6.11.0","eslint-plugin-prettier": "^3.1.4","https-localhost": "^4.6.0","nodemon": "^2.0.4","prettier": "^2.0.5","ts-node": "^8.10.2","typescript": "^3.9.5"  }}

SSE in React native

$
0
0

how can i use SSE (server sent events) in react native ?, I have not been able to get it to work,

I try with https://github.com/jordanbyron/react-native-event-source and https://github.com/JonnyBGod/react-native-eventsource but dont work,

My backend api is with spring webflux

import React, {memo, useState, useEffect} from 'react';import {Navigation} from '../types'import AppBarHeader from "../components/AppBarHeader";import RNEventSource from 'react-native-event-source'type Props = {    navigation: Navigation;};const MessageScreen = ({navigation}: Props) => {    const getMessages = (email: string) => {        console.log('obteniendo evt source')        const options = { headers: { Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJ1c2VyQHRlc3QuY29tIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl0sIlVTRVJfSUQiOiI1ZWViYzY4ZmIyMDBlNTAyMjIyNTcyYTEiLCJleHAiOjE1OTI3MDQ0MzAsIkxBU1RfTkFNRSI6IlJvZHJpZ3VleiIsIkVNQUlMIjoidXNlckB0ZXN0LmNvbSIsImF1dGhvcml0aWVzIjpbIlJPTEVfVVNFUiJdLCJqdGkiOiJiNjE3YzE0My04MjhjLTQ3M2ItOGJkNC00MWQ5MmUwN2FkNjUiLCJGSVJTVF9OQU1FIjoiSnVhbiIsImNsaWVudF9pZCI6Im1lZGljYXBwIn0.fNDzx8sjOt1YxwQoxNdlBqXZ6XcMhXGxZQNktAHxmWw'}};        const eventSource = new RNEventSource('http://localhost:8080/chat', options);        eventSource.addEventListener('message', (data) => {            console.log(data.type); // message            console.log(data.data);        });    }    getMessages('das');    return (<><AppBarHeader navigation={navigation} title={'Chat'} /></>    );};export default memo(MessageScreen);

Console log

Thanks


Cancel graphQL call on component unmount

$
0
0

I am using below @apollo/GraphQL query inside a React native component

const [getContent, {    error, data, fetchMore, called  }] = useLazyQuery(BROWSE_CONTENT, {    variables: {      sessionIdToken: sessionId,      deviceLocale,      paginationCursor: `'${payload.endCursor}'`    }  })

Once i have data, I use RecyclerListView to render the list.

Problem: since its async call (useLazyQuery), so if user quickly change the View (by clicking the button) i am getting below error.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.    in RecyclerListView (at MyComponent.js:345)

How to cancel useLazyQuery on component unmount.

"RNCSafeAreaView" was not found in the UIManager

$
0
0

I try to open a bundle, but when the android is running it shows the next message

2020-01-05 23:15:45.366 26210-26210/com.note.principal W/.note.principa: Accessing hidden field Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate; (light greylist, reflection) 2020-01-05 23:15:45.470 26210-26242/com.note.principal E/ReactNativeJS: Invariant Violation: requireNativeComponent: "RNCSafeAreaView" was not found in the UIManager.

This error is located at:    in RNCSafeAreaView    in Unknown    in Unknown    in n    in Unknown    in Unknown    in C    in P    in u    in RCTView    in RCTView    in h 2020-01-05 23:15:45.494 26210-26242/com.note.principal E/ReactNativeJS: Invariant Violation: requireNativeComponent:

"RNCSafeAreaView" was not found in the UIManager.

This error is located at:    in P    in u    in RCTView    in RCTView    in h 2020-01-05 23:15:45.502 26210-26242/com.note.principal E/ReactNativeJS: Invariant Violation: requireNativeComponent:

"RNCSafeAreaView" was not found in the UIManager.

This error is located at:    in P    in u    in RCTView    in RCTView    in h 2020-01-05 23:15:45.794 26210-26244/com.note.principal E/unknown:ReactNative: Invariant Violation: requireNativeComponent:

"RNCSafeAreaView" was not found in the UIManager.

This error is located at:    in RNCSafeAreaView    in Unknown    in Unknown    in n    in Unknown    in Unknown    in C    in P    in u    in RCTView    in RCTView    in h, stack:exports@175:1634get@163:682Al@89:70673Ml@89:70108Ul@89:67144Ul@-1Pl@89:65839Pl@-1<unknown>@89:25495unstable_runWithPriority@168:3915sn@89:25442cn@89:25377kl@89:64831la@89:87813render@89:90592exports@342:541run@334:1305runApplication@334:2287value@25:3685<unknown>@25:841value@25:2939value@25:813value@-1 2020-01-05 23:15:45.832 26210-26244/com.note.principal E/unknown:ReactNative: Invariant Violation: requireNativeComponent:

"RNCSafeAreaView" was not found in the UIManager.

This error is located at:    in P    in u    in RCTView    in RCTView    in h, stack:exports@175:1634get@163:682Al@89:70673Ml@89:70108Ul@89:67144Ul@-1Pl@89:65839Pl@-1<unknown>@89:25495unstable_runWithPriority@168:3915sn@89:25442cn@89:25377kl@89:64831la@89:87813render@89:90592exports@342:541run@334:1305runApplication@334:2287value@25:3685<unknown>@25:841value@25:2939value@25:813value@-1 2020-01-05 23:15:45.856 26210-26244/com.note.principal E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modulesProcess: com.note.principal, PID: 26210com.facebook.react.common.JavascriptException: Invariant Violation: requireNativeComponent: "RNCSafeAreaView" was not found in

the UIManager.

This error is located at:    in P    in u    in RCTView    in RCTView    in h, stack:exports@175:1634get@163:682Al@89:70673Ml@89:70108Ul@89:67144Ul@-1Pl@89:65839Pl@-1<unknown>@89:25495unstable_runWithPriority@168:3915sn@89:25442cn@89:25377kl@89:64831la@89:87813render@89:90592exports@342:541run@334:1305runApplication@334:2287value@25:3685<unknown>@25:841value@25:2939value@25:813value@-1    at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:71)    at java.lang.reflect.Method.invoke(Native Method)    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:150)    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)    at android.os.Handler.handleCallback(Handler.java:873)    at android.os.Handler.dispatchMessage(Handler.java:99)    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:26)    at android.os.Looper.loop(Looper.java:193)    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:225)    at java.lang.Thread.run(Thread.java:764) 2020-01-05 23:15:45.862 26210-26244/com.note.principal I/Process: Sending signal.

PID: 26210 SIG: 9

The package of project is

{"name": "Notes","version": "0.0.1","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","bundle_android": "react-native bundle --entry-file index.js --platform android --dev false --bundle-output ./bundles/android/index.android.bundle","bundle_ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ./bundles/ios/main.jsbundle","test": "jest","lint": "eslint ."  },"dependencies": {"@react-native-community/masked-view": "^0.1.5","prop-types": "^15.7.2","react": "16.9.0","react-native": "0.61.5","react-native-gesture-handler": "^1.5.3","react-native-linear-gradient": "^2.5.6","react-native-safe-area-context": "^0.6.2","react-navigation": "^4.0.10","react-navigation-stack": "^2.0.8"  },"devDependencies": {"@babel/core": "^7.7.7","@babel/runtime": "^7.7.7","@react-native-community/eslint-config": "^0.0.6","babel-jest": "^24.9.0","eslint": "^6.8.0","jest": "^24.9.0","metro-react-native-babel-preset": "^0.57.0","react-test-renderer": "16.9.0"  },"jest": {"preset": "react-native"  }}

The project of gradle

include ':app'rootProject.name='Notes'include ':hermes-engine'project(':hermes-engine').projectDir = new File(rootProject.projectDir, '../node_modules/hermes-engine/android/')include ':react-native-gesture-handler'project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')include ':react-native-linear-gradient'project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    ext.kotlin_version = '1.3.50'    repositories {        google()        jcenter()        mavenLocal()    }    dependencies {        classpath 'com.android.tools.build:gradle:3.4.2'        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        google()        jcenter()        mavenLocal()        maven {            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm            url "$rootDir/../node_modules/react-native/android"        }        maven {            // Android JSC is installed from npm            url("$rootDir/../node_modules/jsc-android/dist")        }    }}task clean(type: Delete) {    delete rootProject.buildDir}apply plugin: 'com.android.application'apply plugin: 'kotlin-android'apply plugin: 'kotlin-android-extensions'android {    compileSdkVersion 28    buildToolsVersion "28.0.3"    defaultConfig {        applicationId ""        minSdkVersion 21        targetSdkVersion 28        versionCode 1        versionName "1.0"        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'        }    }}project.ext.react = [        enableHermes: false,]def jscFlavor = 'org.webkit:android-jsc:+'def enableHermes = project.ext.react.get("enableHermes", false)dependencies {    implementation fileTree(dir: 'libs', include: ['*.jar'])    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"    implementation 'com.android.support:appcompat-v7:28.0.0'    implementation 'com.android.support.constraint:constraint-layout:1.1.3'    testImplementation 'junit:junit:4.12'    androidTestImplementation 'com.android.support.test:runner:1.0.2'    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'    implementation "com.facebook.react:react-native:+"    implementation 'com.android.support:support-annotations:27.1.1'    implementation project(':react-native-gesture-handler')    implementation project(':react-native-linear-gradient')    if (enableHermes) {        implementation project(':hermes-engine')        debugImplementation files(hermesPath +"hermes-debug.aar")        releaseImplementation files(hermesPath +"hermes-release.aar")    } else {        implementation jscFlavor    }}

This is the code of activity

package com.noteimport android.content.Intentimport android.net.Uriimport android.os.Buildimport android.os.Bundleimport android.provider.Settingsimport android.util.Logimport androidx.appcompat.app.AppCompatActivityimport com.facebook.react.ReactInstanceManagerimport com.facebook.react.ReactRootViewimport com.facebook.react.common.LifecycleStateimport com.facebook.react.modules.core.DefaultHardwareBackBtnHandlerimport com.facebook.react.shell.MainReactPackageimport com.facebook.soloader.SoLoaderimport com.swmansion.gesturehandler.react.RNGestureHandlerPackageimport com.BV.LinearGradient.LinearGradientPackageclass ReactActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler {    private val OVERLAY_PERMISSION_REQ_CODE = 1    private lateinit var mReactRootView: ReactRootView    private lateinit var mReactInstanceManager: ReactInstanceManager    override fun onCreate(savedInstanceState: Bundle?) {        super.onCreate(savedInstanceState)        SoLoader.init(this, false)        mReactRootView = ReactRootView(this)        mReactInstanceManager = ReactInstanceManager.builder()            .setApplication(application)            .setCurrentActivity(this)            .setApplication(application)            .setBundleAssetName("aaaaaa.android.bundle")            .addPackage(MainReactPackage())            .addPackage(RNGestureHandlerPackage())            .addPackage(LinearGradientPackage())            .setInitialLifecycleState(LifecycleState.RESUMED)            .build()        // The string here (e.g. "MyReactNativeApp") has to match        // the string in AppRegistry.registerComponent() in index.js        mReactRootView.startReactApplication(mReactInstanceManager, "Notes", null)        setContentView(mReactRootView)        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {            if (!Settings.canDrawOverlays(this)) {                val intent = Intent(                        Settings.ACTION_MANAGE_OVERLAY_PERMISSION,                        Uri.parse("package:$packageName")                )                startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE)            }        }    }    override fun invokeDefaultOnBackPressed() {        super.onBackPressed()    }    override fun onBackPressed() {        if (mReactInstanceManager != null) {            mReactInstanceManager.onBackPressed()        } else {            super.onBackPressed()        }    }    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {        if (requestCode == OVERLAY_PERMISSION_REQ_CODE) {            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {                if (!Settings.canDrawOverlays(this)) {                    // SYSTEM_ALERT_WINDOW permission not granted                }            }        }        mReactInstanceManager?.onActivityResult(this,requestCode, resultCode, data)    }}

someone knows what is the solution?

React Native "RNCSafeAreaView" was not found in the UIManager

$
0
0

enter image description here

I am running a react-native application on Mac. but I am getting "RNCSafeAreaView" was not found in the UIManager.

Implement BouncingScrollPhysics animation in react native

$
0
0

How can I implement something like BouncingScrollPhysics that is one of ScrollPhysics type in flutter listView in react native.

Here is What I need in react native.

Example

I know there is bounce property for react native, but it only works for iOS, I need for android too.

Detection face tilt right or left in React native

$
0
0

I want to build a dating app that detects whether the user tilts their head right or left to do swipe right/Left in react native

which of these can work for us?rn-firebase face detectiontensor flow with Posnetor Does rn camera have something built-in?

Can use aem with react native

$
0
0

Can use aem with react native?Can we use AEM for react-native, if yes than please provide any guide or tutorial link.

Does updating the Gradle plugin via Android Studio affect React Native?

$
0
0

I really don't know what's going on, but ever since I updated my Gradle plugin in Android Studio (as a suggested update by Android Studio) I've been having issues with npx react-native run-android, or was I never supposed to mess around with the Gradle stuff, leaving that for React Native?

I'm a total noob to React Native framework

Thanks in advance!

PS: This is my first question on StackOverflow, if I went a little bit off the rail, please bear with me.

Screenshot


64 bit version issue in react-native android app by google play store

$
0
0

According to https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html:

In August 2019, Play store will require that new apps and app updates with native libraries provide 64-bit versions in addition to their 32-bit versions.

I have a React Native application (which includes native code). My question is how can I know whether a third party library I'm using or even my own code is not supporting 64-bit? And how can I fix it?

Update

I added x86_64 to my build.gradle and I now see the x86_64 folder in the apk but I think some of the files are missing.

Here is, how my x86 folder looks like:

enter image description here

And here is how my x86_64 folder looks like:

enter image description here

Cannot find module 'core-js/fn/array/values' in react native

$
0
0

Hi I have just started working on react-native platform, followed this tutorial https://facebook.github.io/react-native/docs/getting-started.html I am getting this error.

E:\React Programming\AwesomeProject>react-native run-androidmodule.js:327    throw err;    ^Error: Cannot find module 'core-js/fn/array/values'    at Function.Module._resolveFilename (module.js:325:15)    at Function.Module._load (module.js:276:25)    at Module.require (module.js:353:17)    at require (internal/module.js:12:17)    at Object.<anonymous> (E:\React Programming\AwesomeProject\node_modules\react-native\packager\babelRegisterOnly.js:11:27)    at Module._compile (module.js:409:26)    at Object.Module._extensions..js (module.js:416:10)    at Module.load (module.js:343:32)    at Function.Module._load (module.js:300:12)    at Module.require (module.js:353:17)E:\React Programming\AwesomeProject>

Backing up Android keystore using Expo - Do we need to save the associated passwords?

$
0
0

When you run expo fetch:android:keystore it shows the follow:

Configuring credentials for myApp in project myAppKeystore credentials  Keystore password: 1234567890abcdef1234567890abcdef  Key alias:         1234567890abcdef1234567890abcd==  Key password:      1234567890abcdef1234567890abcdef  Path to Keystore:  C:\projects\myApp\myApp.jks

My question is, do we need to separately store the passwords and alias, or only the .jks file?

This is not made clear in the relevant Expo documentation.

Yarn ios or react-native run-ios not running react native app

$
0
0

I have created a react-native app using create-react-native-app package. Now running the app using yarn android to run in android emulator works fine. It auto starts the metro builder. But, in case of iOS, using yarn ios does not auto start the metro builder so I have to run it manually and then run yarn ios command to run the app in iOS simulator.

Why is this happening?

Also, in case of android, I have to change the gradle version as well otherwise it gives me error:

Error:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

But, checking the version using gradle --version shows version 6.5. I need to change gradle-5.6.3-all.zip to gradle-6.3-all.zip or above in file gradle-wrapper.properties. Is there any permanent way to solve this?

How to rename / move a folder in react native fs?

$
0
0

I am having trouble renaming and moving folders cause react native fs has only moveFile option that performs on files only and not folders.Doing it recursive is also messy and it is hard to execute lines after performing rename or move option due to synchronous execution.I have attached the code for move below with the bug.Kindly help me figure this out.

moveAll = (path, outputPath) => new Promise((resolve, reject) => {// is a folderif (path.split(".").length == 1) {  // CHeck if folder already exists  RNFS.exists(outputPath)    .then((exists) => {      if (exists) {        // Delete the folder if exists        RNFS.unlink(outputPath)          .then(() => {          })          // `unlink` will throw an error, if the item to unlink does not exist          .catch((err) => {            console.log(err.message);          });      }      // MAKE FRESH FOLDER      RNFS.mkdir(outputPath);      resolve(RNFS.readDir(path)        .then((result) => {          result.map(            (item) =>              new Promise((resolve, reject) => {                resolve(this.moveAll(item.path, outputPath +"/" + item.name));              })          )        })        .catch((e) => {          console.log("ERROR", e)        })      )    })    .catch((e) => {      console.log(e)    })} else {  RNFS.moveFile(path, outputPath)    .then(() => {    })    .catch((e) => {      console.log(e)    })}})

Thanks in advance :)

Viewing all 28480 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>