react-native-android

React native building release isn't reflecting changes that debug does (android)

你说的曾经没有我的故事 提交于 2019-12-21 17:19:05
问题 I made some styling changes to my react native app. Everything looks good in debug so I tried to run the release variant using 'react-native run-android --variant=release' and none of that changes in debug show up. I made sure I wasn't crazy and removed the background image. The release variant didn't change at all. I then tried generating the signed apk and installing it manually. Same thing. I can't seem to find anything on google. Has anyone had this problem before or have suggestions on

How to import react native project in android studio

試著忘記壹切 提交于 2019-12-21 06:59:43
问题 I started development of the android application using atom text editor. It is working fine as long I am writing code in JS and JSX. I have to do functionality which is not available in react native, so I need to write java code as like https://facebook.github.io/react-native/docs/native-modules-android.html ToastModule.java package com.facebook.react.modules.toast; import android.widget.Toast; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge

React Native FlatList - Variable columns

我只是一个虾纸丫 提交于 2019-12-21 06:08:07
问题 I am developing a infinitely scrolling list of products which contain different types of products. A product can be featured or not featured. When a product is featured, we have a product card design that takes up the full width of the phone, otherwise the design calls for a 2 column row The data looks something like this: [ { "type": "featured-product", "name": "Product", "description: "yadda yadda" }, { "type": "product", "name": "Another Product", "description: "yadda yadda" }, { "type":

React Native FlatList - Variable columns

浪尽此生 提交于 2019-12-21 06:07:00
问题 I am developing a infinitely scrolling list of products which contain different types of products. A product can be featured or not featured. When a product is featured, we have a product card design that takes up the full width of the phone, otherwise the design calls for a 2 column row The data looks something like this: [ { "type": "featured-product", "name": "Product", "description: "yadda yadda" }, { "type": "product", "name": "Another Product", "description: "yadda yadda" }, { "type":

How to stop the Android Hardware Back Button from functioning in react-navigation for react-native?

筅森魡賤 提交于 2019-12-21 05:05:09
问题 I am developing a trivia game, I am using react-navigation to handle navigation, I have 3 components, (newGame, Questions, Results ) I don't want the user to go back to the questions from the results page if the no. of questions has been exhausted, however, pressing the back button ( Android Hardware ) is taking him back to the questions. I then tried to handle the hardware back button like so: componentWillMount() { this.props.gameState(true); BackHandler.addEventListener('hardwareBackPress'

How to use firebase TestLab with react native

怎甘沉沦 提交于 2019-12-21 04:34:17
问题 I was trying to run a robo test for my react native app on firebase TestLab, but I couldn't get the robo test pass login. The first problem is that it doesn't type in email and password. In my js file I had: <Input ... testID="usernameInput" /> <Input ... testID="passwordInput" /> and I put this in my firebase console However, it didn't work at all. I checked the video recording, it was not typed in. Second problem is that even if I hard code my username and password in debug apk, it won't

Element overflow hidden in React-Native Android

强颜欢笑 提交于 2019-12-21 03:55:27
问题 I have an app here where I need to put the logo in the navbar. That need to overflow the scene layout. Work well in Ios with no problem but in android seem like he not working. I put the code at the bottom of the images. As you can see I use EStyleSheet so that let me use %. IOS Android import React from 'react'; import { Scene, Router } from 'react-native-router-flux'; import EStyleSheet from 'react-native-extended-stylesheet'; import { View, Platform } from 'react-native'; import {

JS server not recognized, continuing with build

ε祈祈猫儿з 提交于 2019-12-21 03:55:20
问题 Environment Windows 10 Npm 5.5.1 react-native-cli 2.0.1 react-native 0.50.3 Genymotion Google Nexus 7 - 6.0.0 API 23 Android stuff: Sdk Version: 26 buildToolsVersion '26.0.2' TargetsdkVersion: 26 compile "com.android.support:appcompat-v7:26.0.2" I have run npm start --reset-cache as well as react-native start --reset-cache but I keep getting the JS server not recognized, continuing with build. This prevents the packager bundling the assets before running on my Emulator. I have followed

How to post multipart/formdata using fetch in react-native?

霸气de小男生 提交于 2019-12-21 02:46:25
问题 i want to post Form Data like that. what should i prepare for sending image file data? i have Uri, type, filename, size. then will use fetch for it. Content-type in header is 'multipart/formdata' thanks for helping 回答1: You should have an upload function, which should look like this: upload(url, data) { let options = { headers: { 'Content-Type': 'multipart/form-data' }, method: 'POST' }; options.body = new FormData(); for (let key in data) { options.body.append(key, data[key]); } return fetch

Running React Native Android on device

别等时光非礼了梦想. 提交于 2019-12-20 15:29:50
问题 I followed this official help page and also consulted this previous SO question. But I still don't know what is wrong here. Let's take step by step: Ensure the package server is running. From the screenshot, you can see the command I typed "react-native run-android" and the reponse "Starting JS server..." Ensure your device is connected... Yes, Vysor sees my device. Wee see Vysor showing the app running in the screenshot. ... USB enabled Yes, the app is running, that's why we see the red