react-native-android

React Native: Unfortunately, Application has stopped

让人想犯罪 __ 提交于 2021-02-08 08:18:24
问题 My app worked properly ! When run android The application is compiled without error, but returns the message when it's displayed. Unfortunately, application has stopped It happened when i install and link these two packages react-native-push-notification AND react-native-google-analytics-bridge { "rnpm": { "assets": [ "./assets/fonts/" ] }, "name": "Melkana", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" },

access environment variable in React-Native AndroidManifest.xml

这一生的挚爱 提交于 2021-02-08 07:40:08
问题 I'm new to React Native. The task at hand is to set my Google API key in AndroidManifest.xml without exposing it, when pushed to GitHub. I set up an environment variable called API_KEY, but however I want to access it in the .xml , I get an error when trying to spin up the dev server. So far I tried: android:value=${env.API_KEY} android:value="${env.API_KEY}" android:value="${API_KEY}" Thank you! 回答1: assuming that you have defined the key in your .env file, you can set that up on build

undefined is not an object (evaluating 'allRowsIDs.length') (React-Native)

拟墨画扇 提交于 2021-02-07 11:57:58
问题 I'm very new to React-Native. Following the basic React-Native tutorial I'm trying to fetch JSON data from "https://facebook.github.io/react-native/movies.json". I can display the title and description properties but when I try to display the "movies" property using a ListView I get the following error: undefined is not an object (evaluating 'allRowsIDs.length') import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, ListView } from 'react-native'; var ds = new

Network error with axios and android emulator

筅森魡賤 提交于 2021-02-07 11:48:45
问题 I got a React-Native application working with a NodeJS backend which serves an API. My React-Native front is using Expo and Axios to hit on a route of my NodeJS API (using Hapi, Joi, Knex), which will (for the example) update my DB (MySQL). Everything works properly with my iOS simulator. However, on Android Emulator, SOME of my hits on route ""does not work"" with the following error message : Network Error - node_modules/axios/lib/core/createError.js:16:24 in createError (actually, it

React-native run-android stuck at 99% appDebug

情到浓时终转凉″ 提交于 2021-02-07 06:53:15
问题 I have previously shut down the react-native run-android still it gets stuck at 99% executing . I don't seem to find any solution to this .please help 回答1: Please, try this: adb kill-server adb start-server 回答2: shutting down my mac after trying several commands, like the two above was the solution which worked for me. 回答3: sudo lsof -i:8081 , kill -9 pid . 来源: https://stackoverflow.com/questions/57214774/react-native-run-android-stuck-at-99-appdebug

How to emit a touch event in react native

断了今生、忘了曾经 提交于 2021-02-07 04:18:59
问题 I am trying to enable panResponder to move a component through the screen in a drag and drop mode. However this drag and drop must be initiated through a longPress on such element. longPress captures the event and so when panResponder is enabled onStartShouldSetPanResponder => this.state.panEnabled we need to press again. I would like to fire a native event, or, else, activate the drag without pressing again. Is it possible to re-emit a native event? Can we pass it to the panResponder in any

How to emit a touch event in react native

喜欢而已 提交于 2021-02-07 04:16:26
问题 I am trying to enable panResponder to move a component through the screen in a drag and drop mode. However this drag and drop must be initiated through a longPress on such element. longPress captures the event and so when panResponder is enabled onStartShouldSetPanResponder => this.state.panEnabled we need to press again. I would like to fire a native event, or, else, activate the drag without pressing again. Is it possible to re-emit a native event? Can we pass it to the panResponder in any

How to decrease React-Native android App Size

…衆ロ難τιáo~ 提交于 2021-02-07 03:08:41
问题 For my react native android app, size of codes I have written is only 12KB But package generated is of size 7.9MB. How can i decrease that. As per Documentation for react native, I have already enbabled proguard on file app_root/android/app/proguard-rules.pro but size of didn't decrease ... android { ... buildTypes { release { ... minifyEnabled true } } } ... Is there a solution available for this? 回答1: React Native app APKs include JSCore binaries for x86 and ARM. If you don't need x86 you

How to decrease React-Native android App Size

梦想的初衷 提交于 2021-02-07 03:07:30
问题 For my react native android app, size of codes I have written is only 12KB But package generated is of size 7.9MB. How can i decrease that. As per Documentation for react native, I have already enbabled proguard on file app_root/android/app/proguard-rules.pro but size of didn't decrease ... android { ... buildTypes { release { ... minifyEnabled true } } } ... Is there a solution available for this? 回答1: React Native app APKs include JSCore binaries for x86 and ARM. If you don't need x86 you

How to decrease React-Native android App Size

[亡魂溺海] 提交于 2021-02-07 03:06:16
问题 For my react native android app, size of codes I have written is only 12KB But package generated is of size 7.9MB. How can i decrease that. As per Documentation for react native, I have already enbabled proguard on file app_root/android/app/proguard-rules.pro but size of didn't decrease ... android { ... buildTypes { release { ... minifyEnabled true } } } ... Is there a solution available for this? 回答1: React Native app APKs include JSCore binaries for x86 and ARM. If you don't need x86 you