expo

Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference getDouble

 ̄綄美尐妖づ 提交于 2019-12-10 17:12:59
问题 I am using react-native-maps library to show google maps in react-native application. I am tracking user movement and want to rotate the map when location will be changed. For map rotation I am calculating rotation angle and using animateCamera trying to rotate the map like the following: this.map.animateCamera({ heading: rotation, center: {latitude: currentLocation.latitude, longitude: currentLocation.longitude}, pitch: this.state.currentAngle }, {duration: 1000}); I've checked and rotation,

How to load “ionicons” font in expo sdk33?

倖福魔咒の 提交于 2019-12-10 17:06:21
问题 after upgrading to expo sdk 33.0.0, when i build my react native expo app everything is ok but as soon as the app starts the the following error shows up: fontFamily "ionicons" is not a system font and has not been loaded through Font.loadAsync before the update i was using the sdk version 32.0.0 and everything was ok. I tried to add the font as explained here https://docs.expo.io/versions/latest/guides/using-custom-fonts/ in my app.js componentDidMount function: const Ionicons = require(".

React Native - FlatList Not Rendering

落花浮王杯 提交于 2019-12-10 16:01:44
问题 (Note: I'm using Expo for this app) I'm attempting to render a FlatList that displays a list of printers. Here's the code: <FlatList data={printers} keyExtractor={printer => printer.id} renderItem={({ item }) => { return ( <Printer printerTitle={item.name} selected={item.selected} last={item === last(printers)} /> ); }} /> Here's the code for the <Printer /> component: const Printer = props => { const { last, printerTitle, selected } = props; return ( <View style={[styles.container, last ?

StatusBar color in React Native

穿精又带淫゛_ 提交于 2019-12-10 14:05:45
问题 How can I change background color of StatusBar component from react-native , without editing Android specific files? Docs says, that I can use backgroundColor property. But it fails. barStyle property, setBarStyle && setBackgroundColor static methods don`t work properly too. Only hidden property works. I`m using create-react-native-app, built with Expo. 回答1: In Expo App, you need to edit app.json in your project root directory like this: { "expo": { "sdkVersion": "16.0.0", "androidStatusBar":

Expo RN: Detach vs Eject

☆樱花仙子☆ 提交于 2019-12-10 13:18:42
问题 I currently have an app built in React Native using Expo (create-react-native-app) that needs some native code. As I understand one has two options for dropping down to pure react native, ejecting and detaching. Seeing that I have already have used a fair amount Expo API's up until this point, I must detach to ExpoKit. Is my understanding correct that if I purely eject (as opposed to detaching to ExpoKit) the current Expo tools I have used wont work? Appreciate any feedback! 回答1: Seems that

How to define entry point for react native app

丶灬走出姿态 提交于 2019-12-10 12:55:24
问题 I'm just getting started with react native and have created a base app with create-react-native-app . I did some restructuring and made a few new folders and renamed the App.js to Home.js. I modified the app.json to contain an entry point that references the new Home.js file. When I load the app, nothing happens. There's no error, it just stays on the expo screen. . -components -screens -Home Home.js -config -node_modules -tests app.json app.json file: { "expo": { "sdkVersion" : "23.0.0",

react native expo how to make nested tab

江枫思渺然 提交于 2019-12-10 12:16:39
问题 I'm using react-navigation to make the bottom tab. Now I want to add the hobby and job tab inside one of the bottom nav. Something like in the photo. How do you do nested tab like this add the jobby and job tab and make it work? This current mainTabnavigator.js const HomeStack = createStackNavigator({ Home: HomeScreen, }); HomeStack.navigationOptions = { tabBarLabel: 'Home', }; const LinksStack = createStackNavigator({ Links: LinksScreen, }); LinksStack.navigationOptions = { tabBarLabel:

React Native + Firebase + Expo versions love triangle issues

社会主义新天地 提交于 2019-12-10 10:39:59
问题 I am trying to implement React Native authentication with Firebase using Expo. I am currently having following versions: Expo: 20.0.0 npm: 5.4.0 firebase: 4.3.0 I get the following error: Error: React native is not installed. Please run npm install in your project directory. How I got here Expo recommends npm version 4.6.1. (In fact, on Expo forum here in post about npm breaking apps, it has been advised to downgrade to 4.* version of npm). But firebase 4.3.0 fails to install with npm version

Unable to resolve “fbjs/lib/areEqual” from “node_modules\react-native-gesture-handler\createHandler.js”

好久不见. 提交于 2019-12-10 09:59:13
问题 I'm building a react-native application with expo, however, I have an error, therefore I'm unable to continue building the application. I even looked for the file in node_modules that is mentioned in the error message. I'm using the react-native-gesture-handler for my screen navigation. If I uninstalled the react-native-gesture-handler and I removed the navigation code would this solve my error? How do I resolve this? App.js import React, { Component } from 'react'; import { StackNavigator }

Expo.FileSystem.downloadAsync do not show download notification

不打扰是莪最后的温柔 提交于 2019-12-10 04:15:08
问题 I am using expo FileSystem to download the pdf file. The API response lands into success function. However, I am not able to show the downloaded file to the user. The expected behaviour should be like we usually see notification icon on the status bar and on click on icon its opens your file. FileSystem.downloadAsync( 'https://bitcoin.org/bitcoin.pdf', FileSystem.documentDirectory + 'Stay_Overview.xlsx' ).then(({ uri }) => { console.log('Finished downloading to ', uri); }) .catch(error => {