react-native-android

React Native Crash Undefined is not an object (Evaluating 'Sn[e]')

半腔热情 提交于 2019-12-11 02:34:26
问题 Any one facing react native build issue? I am trying to generate debug build but its crashing when the app is launched . The exception has no useful information. I was facing the same issue with sudo react-native run-android But that got resolved after upgrading RN from 0.48 to 0.55(latest Stable Version) But the crash remain same for the apk generated using sudo gradlew assembleDebug The crash is similar to https://github.com/facebook/react-native/issues/16745 please see screenshot 回答1:

Passing Parameters with axios in react-native android app

旧时模样 提交于 2019-12-11 02:21:30
问题 I require to pass some parameters with AXIOS in react-native but don't know how should I pass parameters with AXIOS. I found this post useful but its not fully satisfy my issue. I need to pass below parameters to fetch all items from API: Working example in PHP: $url = 'https://APISITE.net/api/Stock/GetStockItems?keyWord=6666777788889&locationId=""&entriesPerPage=10000&pageNumber=1&excludeComposites=true'; Its working well in PHP TEST file and i only need to pass keyword value ie

React Native Android :app:compileDebugJava error

ぃ、小莉子 提交于 2019-12-11 01:27:47
问题 When I run react-native run-android, i get the following error; I am setting it up to run on a device. :app:compileDebugJava /Users/hello/MediaFire/apps/test2/android/app/src/main/java/com/test2/MainApplication.java:6: error: cannot find symbol import com.facebook.react.ReactApplication; ^ symbol: class ReactApplication location: package com.facebook.react /Users/hello/MediaFire/apps/test2/android/app/src/main/java/com/test2/MainApplication.java:8: error: cannot find symbol import com

How to navigate from custom navigator to createBottomTabNavigator in React Native?

牧云@^-^@ 提交于 2019-12-10 23:45:13
问题 I've a custom navigator because I wanted to go back to the previous screen using a back swipe gesture. Below is the code of the main file from where the navigators are called. const MainSwipeStack = () => { return( <Navigator> <Route name="LoggedOutHome" component={LoggedOutHome} /> <Route name="SignUp" component={SignUp} /> <Route name="SignupUsername" component={SignupUsername} /> <Route name="Login" component={Login} /> </Navigator> ); } export default createSwitchNavigator({ SwipeStack:

Integrate Stack, Drawer and Tab Navigator in React Native

Deadly 提交于 2019-12-10 23:30:15
问题 I have tried to implement Stack, Drawer and Tab Navigator together in a single project but it's not working what I expected. First, created tab navigator, one is Home and another one is Careers. Next, creating Stack Navigator and integrate drawer as root in NavigationApp. Next, Creating Drawer Navigator integrate AppDrawer as root. import { StackNavigator } from 'react-navigation' import { TabNavigator } from 'react-navigation' import { DrawerNavigator } from 'react-navigation' import

canOverrideExistingModule issue in react-native application

陌路散爱 提交于 2019-12-10 23:15:37
问题 Hello every one i tried to create an camera app with react-native-camera module when i tried to run this app on my device (android mobile) getting following error. Can any one please provide me solution for this ? 回答1: Go to file "MainApplication.java" (under .\android\app\src\main\java\com\projectName) Make sure that under getPackages() function you don't have duplicate lines (in my case I had "new RCTCameraPackage()" twice). Fix duplicate imports as well. 来源: https://stackoverflow.com

Crop image with react-native

大兔子大兔子 提交于 2019-12-10 20:56:19
问题 Hello World, I trying to crop an image like explain on the React-native Doc <Image source={{uri: this.props.image, crop: {left: 50, top: 50, width: 100, height: 100}}} style={{height: 100, width: 100}}/> But it's doesn't work the image is not cropped. Any idea? 回答1: From the docs: On the infrastructure side, the reason is that it allows us to attach metadata to this object. For example if you are using require('./my-icon.png'), then we add information about its actual location and size (don't

React-native manifest merger failed

空扰寡人 提交于 2019-12-10 18:51:03
问题 Suddenly when i compile my project in android phone i get this error with the merge of manifest Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools

WebStorm debugging create-react-native-app

人走茶凉 提交于 2019-12-10 18:21:20
问题 What should I set in Run Debug Configuration in WebStorm to debug a app created by create-react-native-app ? I'm at a loss on how to debug since it doesn't use ~/.node_modules/lib/node_modules/react-native-cli but a custom module called react-native-scripts to start the compiling: package.json: "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", "scripts": { "start": "react-native-scripts start", "eject": "react-native-scripts eject", "android": "react-native-scripts

Set initial state from navigation props

二次信任 提交于 2019-12-10 17:39:32
问题 I am using React Navigation to route between screen. I have an initial screen which contains a FlatList , onclick of an item I route to a new screen while passing params like this. props.navigation.navigate('Details', { id: props.id, title: props.title }); In the Details screen I can receive it using the following code but how do I set the state considering it's a static function and I do not have access to this.setState() . static navigationOptions = ({navigation}) => { const {params} =