react-native-android

React-native loads local images with a delay

拥有回忆 提交于 2020-01-16 19:49:11
问题 I have a hybrid react-native app and I have some static images which are loaded from the bundle. In the app when I open a page containing the images, it shows a gray rectangle while the image is getting decoded. Here is some pics of what I mean: When the page loads, I can see the left image first and after a delay of ~0.2 seconds the right image fades in. I have searched for this issue and I can't find any clean work arounds. This is the code I use to load the image: <Image style={{ height:

Error while running react-native run-android

为君一笑 提交于 2020-01-16 18:40:35
问题 https://facebook.github.io/react-native/docs/getting-started.html I have followed the instruction that are on this link. But app is not starting on emulator I then follow the instructions on Delete the node_modules folder - rm -rf node_modules && npm install Reset packager cache - rm -fr $TMPDIR/react-* or node_modules/react-native/packager/packager.sh --reset-cache Clear watchman watches - watchman watch-del-all Recreate the project from scratch and also create whole new project again to but

react-native-image-picker installation breaks my app

泪湿孤枕 提交于 2020-01-16 14:07:47
问题 Step 1: npm install react-native-image-picker ......app is still building fine..... Step 2: react-native link react-native-image picker ...app no longer compiles When I clean gradle I get error: " Could not set process working directory to 'C:\code\rn\xs\node_modules\react-native-image-picker\example\android': could not set current directory (errno 3) " When I try to rebuild in gradle I also get error: " Manifest merger failed : Attribute application@appComponentFactory value=(android.support

react-native-image-picker installation breaks my app

做~自己de王妃 提交于 2020-01-16 14:05:06
问题 Step 1: npm install react-native-image-picker ......app is still building fine..... Step 2: react-native link react-native-image picker ...app no longer compiles When I clean gradle I get error: " Could not set process working directory to 'C:\code\rn\xs\node_modules\react-native-image-picker\example\android': could not set current directory (errno 3) " When I try to rebuild in gradle I also get error: " Manifest merger failed : Attribute application@appComponentFactory value=(android.support

Unable to include AB Testing for React Native application

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-16 13:58:50
问题 I am integrating A/B Testing for my React Native application using Firebase. I have tried two methods - using react-native-ab and react-native-ab-test. In the first case, I get an error saying "undefined is not an object(evaluating PropTypes.string)" In the second case, I get an error saying "index.ios.js tries to require 'react-native' but there are several files providing this module. You can delete or fix them." In both the cases, I get these errors just by importing the dependency in my

How to Implement react native otp retriever and generate hash key for application

旧时模样 提交于 2020-01-16 08:45:23
问题 Beginner to React native I am trying to verify OTP automatically using react-native-sms-retriever I have implemented following example in project Example implemented This exampleis not provudung way to get hash key. you have to get it manually by executing command When I execute command, it won't ask for password. It should ask because of here it is I have generated debug hash key using bellow command executed in 'java/bin' folder. But its not keytool -exportcert -alias androiddebugkey

React native picker selected value gives undefined is not an object error

做~自己de王妃 提交于 2020-01-15 12:07:53
问题 I am using below code for picker and to send the value selected from picker to api call, i keep getting this error Possible Unhandled Promise Rejection (id: 1):undefined is not an object (evaluating 'this.state.selected1') what am i doing wrong? 'use strict' import React, { Component } from 'react'; const ReactNative = require('react-native'); const { Picker, AppRegistry, StyleSheet, Navigator, Text, View, TextInput, Button, ScrollView } = ReactNative; const Item = Picker.Item; import {

How to apply click event on TextInput in react native

我与影子孤独终老i 提交于 2020-01-15 05:12:29
问题 Hi I am using TextInput in my react native application. I want to open Date Dialog on clicking on TextInput . I didn't find any work around to apply click event on TextInput . Does anyone know how to do this in react native ? <TextInput style={{ height: 40, borderColor: "gray", borderWidth: 1, marginTop: 8 }} underlineColorAndroid="transparent" placeholder={strings.schedule_date} onKeyPress={keyPress => console.log(keyPress)} /> 回答1: You can use the onFocus prop to know when the user has

How do i change the color of my alert in react native

亡梦爱人 提交于 2020-01-14 13:48:20
问题 How do i change the background color, font size of my alert box in react native? I put my alert after a button is clicked. I don't know how to style this one, Thanks for the help Alert.alert( 'Plate', 'Plate has been sent for printing!', [ {text: 'OK', onPress: () => console.log('OK Pressed')}, ], { cancelable: false } ) 回答1: Open android/app/src/main/res/values/styles.xml Add <item name="colorAccent">#000000</item> inside <style> tag. You will get this: <resources> <!-- Base application

Local images are not visible in React-Native app release build

微笑、不失礼 提交于 2020-01-14 13:48:10
问题 In my react-native app I have "src" folder that includes a Images folder and screens folder.My screens folder have various components where I am uing local images from Images using following code. <Image source={require('src/Images/logo.png')} /> logo.png is an image placed in Images folder, there are many more such images referenced like this.Now all these images are shown pretty well in development mode but when I generated the release apk using gradlew assemblereleaseand installed the apk