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

Error occuring after installing react native paper "Expo Developer Tools is disconnected from Expo CLI."

$
0
0

Error: ""Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again.""I'm new to react native. In my very first project (learning from udemy), I was running app through expo in android. To install react native paper, I just killed the cmd. And typed "npm install react-native-paper". After the installation process, to again enter in the expo I typed '''npm run android'''. But it showed me the error ""Expo Developer Tools is disconnected from Expo 'CLI'. Use the expo start command to start the CLI again."" I have tried every effort to resolve this problem, but in the end the only option remain left was to restart the project again.

Also after restarting project from beginning, i got stuck at same very point install react native paper. then again proceeding from that step to run expo, again same problem occur "Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the 'CLI' again." I'm unable to proceed after that. Please help me! how do I proceed further! I'm just in learning phase to react native. Also this is my first question.


I need header sticky without using library in react native [closed]

$
0
0

I need a header sticky without using any plugin in react native. it's possible I am using this way

<SafeAreaView style={styles.container}>        <ScrollView style={styles.scrollView} stickyHeaderIndices={[1]}      showsVerticalScrollIndicator={false}><Text style={styles.text2}>          0000000dd</Text><Text style={styles.text}>          Lorem ipsum dolor sit amet              </Text></ScrollView></SafeAreaView>// css hereconst styles = StyleSheet.create({  text: {    fontSize: 42,  },  text2:{    position:"absolute",    top:0,    width:"100%"  }});

How to get the cursor position in TextInput and the content after the cursor position?

$
0
0

I want to write a component which can edit an article for words input and insert images. I use TextInput for words input. If I want to insert an image in the middle of the text, I will generate an Image component and an new TextInput after the Image. But I don't know how to get the cursor position and content after the cursor.Anyone help?

Not getting any data in DebugView, although data is delivered to Firebase Analytics [duplicate]

$
0
0

I have an app written in react-native and which uses Firebase Analytics for tracking.

It seems that data is tracked in production, but when I try doing adjustments in tracking, I want to use the DebugView to test my changes.

But I simply cannot see any data or available devices in the DebugView of the Firebase Analytics console. It has previously worked for me in other apps, but no devices/data appears with this app.

I have already added the IS_ANALYTICS_ENABLED=YES plist entry and -FIRDebugEnabled launch argument on iOS. On Android I have run the adb shell setprop debug.firebase.analytics.app ... command.

I can see in the logs, that Firebase Analytics is receiving my events and uploading these.

2020-05-15 15:55:34.027603+0200 dacapp[33120:11310779] 5.20.0 - [Firebase/Analytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, -1

I have also checked with Charles Proxy, which also tells me that Firebase Analytics backend is receiving the data as it should.

So I'm pretty sure everyting is sent to FA as it should. I have access to the reports and StreamView of FA and can see data there. The only thing that's not working is the DebugView.

Tried on Android 9 and iOS 13.4, with Firebase/Core 5.5 and react-native-firebase 5.5.6

does sqlite library ( react-native-sqlite-storage ) in react native provides room library for android

$
0
0

I want to use SQL lite library in react native. I am confused whether it provides Room Library of android.Can any one explain?

connect vpn programmatically react native for android ios

$
0
0

I am new to react native, I want to make a VPN client app for Android and IOS. VPN protocol should be IPSec or IKEv2 or any other. I have tried these:

1. OpenVPN

node-openvpn and openvpn-bin but no luck

const openvpnmanager = require('node-openvpn'); **const opts = {  host: '127.0.0.1', // normally '127.0.0.1', will default to if undefined  port: 1337, //port openvpn management console  timeout: 1500, //timeout for connection - optional, will default to 1500ms if undefined  logpath: 'log.txt' //optional write openvpn console output to file, can be relative path or absolute};const auth = {  user: 'vpnUserName',  pass: 'vpnPassword',};const openvpn = openvpnmanager.connect(opts)// will be emited on successful interfacing with openvpn instanceopenvpn.on('connected', () => {  openvpnmanager.authorize(auth);})

2. react native open settings

react-native-device-setting and react-native-open-settings in which they have showed to programmatically open android phone settings like:

install package: npm install react-native-device-settings --save

usage:

import DeviceSettings from 'react-native-device-settings';DeviceSettings.open(); // Open settings menuDeviceSettings.app(); // Open app settings menuDeviceSettings.wifi(); // Open wifi settings menu

but there is no method to open up the VPN Settings and configure VPN. 47306057 has also asked the same problem

i need some direction or way to solve this. is there a library or something that i should use or make a VPN app in android studio and then import the aar file here. will it work?

Can anyone help me out in this? Thanks

Newbie developing Android app in React-Native: blank white screen on wrong emulator

$
0
0

I'm relatively comfortable with React but just getting my feet wet with React-Native. So this is probably something really dumb.

First, when I run react-native run-android, my app ignores the Emulator I already have open in Android Studio (a Google Pixel 2 API 28) and insists on opening another Emulator in Android Studio (a Nexus 10 API 27), despite the fact that a tutorial I followed stated that I needed an API 28 emulator.

Second, and more troubling, when I have a very basic React Native Navigation setup added to my App, the emulator stops displaying anything useful and just shows a blank white screen.

Here's my source code:

import 'react-native-gesture-handler';import {AppRegistry} from 'react-native';import App from './App';import {name as appName} from './app.json';AppRegistry.registerComponent(appName, () => App);
import React from 'react';import {  SafeAreaView,  StatusBar,} from 'react-native';import { NavigationContainer } from '@react-navigation/native';import { createStackNavigator } from '@react-navigation/stack';import Home from './components/Home';import Profile from './components/Profile';const App = () => {  const Stack = createStackNavigator();  return (<NavigationContainer><StatusBar barStyle="dark-content" /><SafeAreaView><Stack.Navigator><Stack.Screen            name="Home"            component={Home}            options={{ title: 'Welcome' }}          /><Stack.Screen name="Profile" component={Profile} /></Stack.Navigator></SafeAreaView></NavigationContainer>  );};
import React from 'react';import { Text, View } from 'react-native';import { exp } from 'react-native-reanimated';const Home = () => {    return (<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}><Text>Home Screen</Text></View>    );}export default Home;
import React from 'react';import { Text, View } from 'react-native';import { exp } from 'react-native-reanimated';const Profile = () => {    return (<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}><Text>Sign In</Text></View>    );}export default Profile;

Pretty simple code. Hopefully all the other moving parts involved in emulating Android don't make this a difficult question for you bright people to aid me with. :)

React Native (with expo) fetch with FormData Network error on Android only

$
0
0

When i try to do a fetch API call in POST with React native (expo SDK 37) using fetch and FormData, everything works perfectly on IOS but it makes a Network error on Android: [TypeError: Network request failed]. I have the same error (network error) if I use axios instead of fetch.

If I replace the formData with empty a {}, it works.I've checked on an emulator and on physical devices (with various Android versions), and i tried to play with headers but no result. And my API has a valide let's encrypt certificate

let url = 'https://my-prod-server/webservice';let formData = new FormData();formData.append('test1','test1');formData.append('test2','test2');let request = await fetch(url, {  headers: {'Accept': 'application/json','Content-Type': 'multipart/form-data',  },  method: 'POST',  body: formData,}).then(response => response.json()).catch(error => console.log('API ERROR: ', error));return request;

React Native, TouchableOpacity wrapping floating button get nothing

$
0
0

I'm creating a simple action button (floating button)

This is working :

<View style={{    width: this.props.size,    height: this.props.size,    borderRadius: this.props.size / 2,    backgroundColor: '#ee6e73',    position: 'absolute',    bottom: 10,    right: 10,    flexDirection:'row'}}><Text>+</Text></View>

This is not :

<TouchableOpacity        onPress={()=>{        }} ><View style={{        width: this.props.size,        height: this.props.size,        borderRadius: this.props.size / 2,        backgroundColor: '#ee6e73',        position: 'absolute',        bottom: 10,        right: 10,        flexDirection:'row'    }}><Text>+</Text></View></TouchableOpacity>

Just wrap with TouchableOpacity then my button not show up without any errors.

React 0.1.7, Android

Then I try move styling from View to TouchableOpacity, It's work

<TouchableOpacity        onPress={()=>{        }}         style={{            width: this.props.size,            height: this.props.size,            position: 'absolute',            borderRadius: this.props.size / 2,            backgroundColor: '#ee6e73',            bottom: 10,            right: 10,        }}><Text>+</Text></TouchableOpacity>

Can any one explain me why?

React Native docs said

[https://facebook.github.io/react-native/docs/touchableopacity.html][1]

A wrapper for making views respond properly to touches. This is done without actually changing the view hierarchy, and in general is easy to add to an app without weird side-effects.

This mean I wrap my original view and it would work as I expected, But it's not.

Unable to load script. Make sure you're either running a metro server or that your bundle 'index.android.bundle' is packaged correctly for release

$
0
0

enter image description here

Hello have you experienced this error after generate an apk with command ./gradlew assembleDebug ??

I just see this error after download the apk on my android phone...

"react-native": "~0.61.5",

Detox - Android / iOS - Cannot run the same test on android

$
0
0

I had been trying to find information about this error that I will post below, I did all the configurations and made research, I am using the latest version of everything.But since I am new to Detox, I was assuming that the test written for iOS works for Android, if so please ignore and please provide details on how to adapt.

Basically the error I am getting is this:

detox[40905] INFO:  [test.js] configuration="android.emu.debug" reportSpecs=true readOnlyEmu=false useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1588961953280 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:ios:).)*$' --maxWorkers 1 "e2e"detox[40909] INFO:  [DetoxServer.js] server listening on localhost:49577...detox[40909] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR] DetoxRuntimeError: Failed to run application on the deviceHINT: Most likely, your tests have timed out and called detox.cleanup() while it was waiting for "ready" message (over WebSocket) from the instrumentation process.    at EmulatorDriver._getInstrumentationCrashError (/Users/brunosoko/Documents/appExam/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:165:12)    at EmulatorDriver.instrumentationCloseListener (/Users/brunosoko/Documents/appExam/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:128:67)    at EmulatorDriver._terminateInstrumentation (/Users/brunosoko/Documents/appExam/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:156:12)    at processTicksAndRejections (internal/process/task_queues.js:97:5)    at ChildProcess.<anonymous> (/Users/brunosoko/Documents/appExam/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:274:7) {  name: 'DetoxRuntimeError'}detox[40909] INFO:  Example: should show login screen after tap on Sign in button

I do not know if it's a bug or something that I am doing wrong.

Here's my package.json

"detox": {"specs": "","configurations": {"ios.sim.debug": {"binaryPath": "/Users/brunosoko/Library/Developer/Xcode/DerivedData/AppExam-cwpqhbjlywwwihfaazprzmynvoym/Build/Products/Debug-iphonesimulator/appExam.app","type": "ios.simulator","name": "iPhone 11"      },"android.emu.debug": {"binaryPath": "/Users/brunosoko/Documents/AppExam/android/app/build/outputs/apk/debug/app-debug.apk","type": "android.emulator","name": "Pixel_3_API_R_2"      }    },"test-runner": "jest"  },

Admob banner ad displaying white, expo on Android

$
0
0

I can't seem to get Admob banners to display anything except a white box. I can confirm that the adUnitID is correct and the ad unit is enabled. My app.json android part:

"android": {"config": {"googleMobileAdsAppId": "xxx"  },"package": "xxx","versionCode": 1},

And here is the Admob banner component within my app.js:

<View style={styles.container}>    {Platform.OS === 'ios'&& <StatusBar barStyle="default" />}<AppNavigator /><View style={styles.adContainer}><AdMobBanner        bannerSize='fullBanner'        adUnitId='xxx'        onDidFailToReceiveAdWithError={() => console.log('error')}        servePersonalizedAds      /></View> </View> const styles = StyleSheet.create({   container: {     flex: 1,     backgroundColor: '#fff',   },   adContainer: {     borderColor: 'red',     borderWidth: 1,   }, });

Looking at the logs, it never actually prints out "error." I put the border around the ad container to confirm that it is being displayed, if I change the bannerSize prop I can see it changing size so it is allocating the space for the banner correctly. This is Expo SDK version 37.0.10 and I've only tested on an Android physical device. When I create an apk it similarly shows the banner as only white.

Problem about send latitude and longtitude from geolocation to react-native-firebase on react native

$
0
0

Greeting everyone.I had problem about send a coordinate to firestore in react-native.I can send a datetime to firestore but the coordinate didn't send from Geolocation to firebase add collection function.Here the code.

import React from 'react';import {View, Text, PermissionsAndroid, Alert, Platform} from 'react-native';import Geolocation from 'react-native-geolocation-service';import MapView, {PROVIDER_GOOGLE, Marker, Polyline} from 'react-native-maps';import {mapStyle} from '../../constants/mapStyle';import firebase from 'react-native-firebase';import {geocollection } from 'geofirestore';export default class Map extends React.Component {  constructor(props) {    super(props);    this.state = {      latitude: 0,      longitude: 0,      coordinates: [],    };  }async componentDidMount() {    try {      const granted = await PermissionsAndroid.request(        PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,        {'title': 'Tracking App','message': 'Tracking App'        }      )      if (granted === PermissionsAndroid.RESULTS.GRANTED) {        console.log("You can use the location")        alert("You can use the location");      } else {        console.log("location permission denied")        alert("location permission denied");      }    } catch (err) {      console.warn(err)   Geolocation.getCurrentPosition(      position => {        this.setState({          latitude: position.coords.latitude,          longitude: position.coords.longitude,          coordinates: this.state.coordinates.concat({            latitude: position.coords.latitude,            longitude: position.coords.longitude,          }),        });      },      error => {        Alert.alert(error.message.toString());      },      {        showLocationDialog: true,        enableHighAccuracy: true,        timeout: 20000,        maximumAge: 0,      },    );    Geolocation.watchPosition(      position => {        this.setState({          latitude: position.coords.latitude,          longitude: position.coords.longitude,          coordinates: this.state.coordinates.concat({            latitude: position.coords.latitude,            longitude: position.coords.longitude,          }),        });      },      error => {        console.log(error);      },      {        showLocationDialog: true,        enableHighAccuracy: true,        timeout: 20000,        maximumAge: 0,        distanceFilter: 0,      },    );    firebase.firestore()    .collection('Tracking')    .add({    lat:this.state.latitude,    long: this.state.longitude,    date:firebase.firestore.FieldValue.serverTimestamp()    }) }  render() {    return (<View style={{flex: 1}}><MapView          provider={PROVIDER_GOOGLE}          customMapStyle={mapStyle}          style={{flex: 1}}          region={{            latitude: this.state.latitude,            longitude: this.state.longitude,            latitudeDelta: 0.0922,            longitudeDelta: 0.0421,          }}><Marker            coordinate={{              latitude: this.state.latitude,              longitude: this.state.longitude,            }}></Marker><Polyline            coordinates={this.state.coordinates}            strokeColor="#bf8221"            strokeColors={['#bf8221','#ffe066','#ffe066','#ffe066','#ffe066',            ]}            strokeWidth={3}          /></MapView></View>    );  }}

I tried to use with lat:position.coords.latitude, long: position.coords.longitude in firestore still keep lat and long in 0.The error said

Possible Unhandled Promise Rejection (id: 0):TypeError: undefined is not a function (near '...}).the(function (data) {...')

How do I fix "emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo'"

$
0
0

So I currently have one AVD that I created with android studio for the Pixel 2 and I decided to create another one for the Pixel 3, which I named "react". After I tried opening "react" with the emulator -react command in the Power terminal, I received the following error:emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo' At first I thought that the problem might be that I needed to add the location of this new emulator to the PATH in the control panel, but I already have a path titled: C:\Users\Ahers\AppData\Local\Android\Sdk\emulator so I don't think that's the issue. I'm not entirely sure what to do so any feedback would be very helpful.

ScrollView rounded corners

$
0
0

I made a custom Image swiper withe ScrollView in React Native, but it looks bad when images with rounded corners move. Is there any way to round the corners of the ScrollView?Those are my ScrollView styles:

style={{     flexDirection: 'row', alignSelf: 'center',     width: this.state.imageWidth,     borderRadius: 20,}}

I click on input and open keypad so header move even I using navigation header

$
0
0

I also try scrollview element but I didn't get any solution I want to header sticky on top.

I am using this code

<View style={styles.test}><Stack.Navigator><Stack.Screen        name="Home"        component={ProgressBar}        options={{          headerStyle: {            backgroundColor: '#f4511e',            position:'relative',            top:0,            height:hp("10.1%"),            flexGrow: 1,            position:"absolute",            top:0          },          // headerTitle: props => <LogoTitle {...props} />,          headerRight: () => (<CButton              onPress={() => alert('This is a button!')}              title="Info"              color="#fff"            />          ),        }}          />

I also try this one.

<KeyboardAvoidingView   style={styles.gradientImg}   contentContainerStyle={{ flexGrow: 1 }} scrollEnabled></KeyboardAvoidingView>

Victory Native: Unable to properly zoom out using Zoom Container. Using android

$
0
0

The performance of zoom out(two fingers pan in) particularly is very poor.Kindly let me know if there are some optimisations needed or workaround.

Also, what are some recommended charting libraries available for react native with good customisation options and good performance?

All kinds of suggestions are appreciated.

Reproducible code:

import React from 'react';import {  StyleSheet,  View,} from 'react-native';import {  VictoryLine,  VictoryChart,  VictoryZoomContainer,} from 'victory-native';const App: () => React$Node = () => {  return (<View style={styles.container}><VictoryChart        containerComponent={<VictoryZoomContainer            zoomDimension="x"            // minimumZoom={{x: 1, y: 0.01}}          />        }><VictoryLine          data={data1.frst}          style={{data: {stroke: 'red'}}}          interpolation="natural"        /></VictoryChart></View>  );};const data1 = {  frst: [    {x: 'Mon', y: 6},    {x: 'Tue', y: 2},    {x: 'Wed', y: 3},    {x: 'Thu', y: 2},    {x: 'Fri', y: 5},    {x: 'Sat', y: 1},    {x: 'Sun', y: 6},    {x: 'Mon2', y: 6},    {x: 'Tue2', y: 2},    {x: 'Wed2', y: 3},    {x: 'Thu2', y: 2},    {x: 'Fri2', y: 5},    {x: 'Sat2', y: 1},    {x: 'Sun2', y: 6},    {x: 'Mon3', y: 6},    {x: 'Tue3', y: 2},    {x: 'Wed3', y: 3},    {x: 'Thu3', y: 2},    {x: 'Fri3', y: 5},    {x: 'Sat3', y: 1},    {x: 'Sun3', y: 6},  ],};const styles = StyleSheet.create({  container: {    flex: 1,    // padding: 10,    justifyContent: 'center',  }});export default App;

How to get overflow visible working on Android with React Native V0.61 and Expo

$
0
0

I'm using React Native 0.61 with Expo SDK 37 which should support overflow visible as stated in the docs (https://reactnative.dev/docs/image-style-props#overflow). Nevertheless I can't get this to work on Android. I know there were some issues to this topic, but they all seem to be closed and resolved on GitHub (https://github.com/facebook/react-native/issues/6802).So how can I get this to work? Or is there even another way to achieve this picture?

Here is a snap where you can see the different behaviors. It behaves like intended on iOS but it's clipping on Android.

https://snack.expo.io/3C9xHTkUp

Issue in pictures:

IOS

Android

Unable to update state in react native component using onChangeText

$
0
0

I have been trying to update the email and password value on submitting the formso that I can pass them in my login API parameters. But I have tried almost everything, the value of this.state won't just update. Every time I try to print the value in console log e.g: cosole.log(this.state.email), it prints empty string i.e the default value set previously.Here is my code below:

login.jsimport React, { Component } from 'react';import { ThemeProvider, Button } from 'react-native-elements';import BliszFloatingLabel from './BliszFloatingLabel'import {  StyleSheet,  Text,  View,  Image,  TextInput,  Animated,  ImageBackground,  Linking} from 'react-native';const  domain = 'http://1xx.xxx.xx.xxx:8000';class Login extends Component {    state = {      email: '',      password: '',    }  LoginAPI = (e,p) => {    console.log(e, "####") }  handleEmail = (text) => {    this.setState({ email: text }) }  handlePassword = (text) => {    this.setState({ password: text }) }  goToSignUpScreen=() =>{    this.props.navigation.navigate('SignUpScreen');  };  goToForgotPasswordScreen=() =>{    this.props.navigation.navigate('ForgotPasswordScreen');  };  render() {    return (<View style={styles.container} ><ImageBackground source={require('../bgrndlogin.jpeg')} style={styles.image} ><View style={styles.heading}><Image style={styles.logo} source={require('../loginlogo.png')} /><Text style={styles.logoText}>Login</Text><Text style={styles.logodesc}>Please Login to continue --></Text></View><View style={styles.form_container}><BliszFloatingLabel              label="Email Id"              value={this.state.email}              onChangeText = {this.handleEmail}              onBlur={this.handleBluremail}            /><BliszFloatingLabel              label="Password"              value={this.state.password}              onChangeText = {this.handlePassword}              onBlur={this.handleBlurpwd}              secureTextEntry={true}            /><ThemeProvider theme={theme}><Button buttonStyle={{                opacity: 0.6,                backgroundColor: '#CC2C24',                borderColor: 'white',                borderWidth: 1,                width: 200,                height: 50,                marginTop: 30,                marginLeft: '20%',                alignItems: 'center',                justifyContent: "center"              }}                title="Login"                type="outline"                onPress = {                  () => this.LoginAPI(this.state.email, this.state.password)               }              /></ThemeProvider><Text style={{              marginTop: 70,              color: '#CC2C24',              fontSize: 16,              fontWeight: "bold"            }}            onPress={              this.goToForgotPasswordScreen               }>              Forgot Password?</Text><Text style={{              marginTop: 20,              color: '#CC2C24',              fontSize: 16,              fontWeight: "bold"            }}            onPress={              this.goToSignUpScreen               }>              Don't have an Account?</Text></View></ImageBackground></View>    )  }}const styles = StyleSheet.create({  container: {    flex: 1,  },  logo: {    width: 115,    height: 50,  },  logoText: {    color: 'white',    fontSize: 36,    fontWeight: "bold"  },  logodesc: {    color: '#CC2C24',    fontSize: 18,    fontWeight: "bold"  },  heading: {    flex: 3,    marginLeft:20,    marginTop:30  },  form_container: {    flex: 7,    marginLeft:20,    marginTop:30,    marginRight: 20,  },  image: {    flex: 1,    resizeMode: "cover",    justifyContent: "center"  },});const theme = {  Button: {    titleStyle: {      color: 'white',      fontWeight: "bold",      fontSize: 18    },  },};export default Login;

I have created a common form as below which I inherit everywhere :BliszFloatingLabel.js

import React, { Component } from 'react';import {  Text,  View,  TextInput,  Animated,} from 'react-native';class BliszFloatingLabel extends Component {    state = {      entry: '',      isFocused: false,    };    UNSAFE_componentWillMount() {      this._animatedIsFocused = new Animated.Value(0);    }    handleInputChange = (inputName, inputValue) => {      this.setState(state => ({         ...state,        [inputName]: inputValue // <-- Put square brackets      }))    }    handleFocus = () => this.setState({ isFocused: true })    handleBlur = () => this.setState({ isFocused: true?this.state.entry!='' :true})    handleValueChange = (entry) => this.setState({ entry });    componentDidUpdate() {      Animated.timing(this._animatedIsFocused, {        toValue: this.state.isFocused ? 1 : 0,        duration: 200,        useNativeDriver: true,      }).start();    }    render() {      // console.log(this.state.entry)      const { label, ...props } = this.props;      const { isFocused } = this.state;      const labelStyle = {        position: 'absolute',        left: 0,        top: !isFocused ? 40 : 0,        fontSize: !isFocused ? 16 : 12,        color: 'white',      };      return (<View style={{ paddingTop: 20,paddingBottom:20 }}><Text style={labelStyle}>            {label}</Text><TextInput            {...props}            style={{              height: 50, fontSize: 16, color: 'white', borderBottomWidth: 1, borderBottomColor: "white"            }}            value={this.state.entry}            onChangeText={this.handleValueChange}            onFocus={this.handleFocus}            onBlur={this.handleBlur}            blurOnSubmit          /></View>      )    }  }  export default BliszFloatingLabel;

./gradlew assembleRelease not working React-native project

$
0
0

I'm trying to build my react-native project using

cd android && ./gradlew assembleRelease

I'm getting following error

enter image description here

Then i tried following command

gradlew assembleRelease -x bundleReleaseJsAndAssets 

Build success and release-apk generated.

However when I execute that apk in my mobile device. Its crashing... Doesn't even open

For the same project, my colleague can generate apk using cd android && ./gradlew assembleRelease and that apk works fine.

Viewing all 28463 articles
Browse latest View live


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