expo

Can't find a variable atob

青春壹個敷衍的年華 提交于 2020-04-08 05:55:00
问题 Screen1.js import React,{useEffect} from 'react' import {View,Text} from 'react-native' import * as firebase from 'firebase/app'; import '@firebase/firestore'; const Screen1 = props =>{ useEffect(() => { var dbh = firebase.firestore().collection("Jots").doc("note"); dbh.set({name:"pradeep"}) //The yellow warning is popped up in this line. }); return( <View> <Text>Title</Text> </View> ) } console [Unhandled promise rejection: ReferenceError: Can't find variable: atob] Stack trace: node_modules

Import .js file as text and use it inside WebView injectedJavaScript in react-native expo

旧城冷巷雨未停 提交于 2020-03-23 12:32:29
问题 I have a file content.js that includes some JavaScript code that I want to inject inside a WebView using injectedJavaScript . I tried: fetch('./content.js').then((result) => { result = result.text(); this.setState(previousState => ( {contentScript: result} )); }); But it doesn't get the right file. const contentScript = require('./content.js'); This works, but it evals the JavaScript straight away and I can't seem to find a way to convert it to string before it gets executed. A solution is to

The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. I want to generate apk

房东的猫 提交于 2020-03-21 20:29:06
问题 I am using expo-cli@3.0.10 This app works fine in client expo which installed in device 回答1: Ok I believe I found the core problem - DNS issue . Your Android simulator cannot properly resolve the hostname using your current DNS for whichever OS you are on be it Mac OS, Windows or Linux. Follow this link to set your DNS address to 8.8.8.8 or some other applicable DNS. Once you set your DNS properly it should work. Make sure that 8.8.8.8 is the first DNS address in the list(?) of DNS addresses

The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. I want to generate apk

十年热恋 提交于 2020-03-21 20:27:19
问题 I am using expo-cli@3.0.10 This app works fine in client expo which installed in device 回答1: Ok I believe I found the core problem - DNS issue . Your Android simulator cannot properly resolve the hostname using your current DNS for whichever OS you are on be it Mac OS, Windows or Linux. Follow this link to set your DNS address to 8.8.8.8 or some other applicable DNS. Once you set your DNS properly it should work. Make sure that 8.8.8.8 is the first DNS address in the list(?) of DNS addresses

“exp: command not found” How do I add expo cli to path?

北城以北 提交于 2020-03-21 06:02:17
问题 I installed the expo cli with npm i -g exp then I run exp and I get -bash: exp: command not found I'm guessing I didn't add exp to path. So how do I do this properly? Nothing I've tried so far works. 回答1: This suggested 3 steps solution worked for me: First check if ~/.npm-global/bin is in your path: echo $PATH . If it isn’t there, you will need to add it to the path. Open up ~/.bash_profile then add the following line to the bottom: export PATH=$PATH:~/.npm-global/bin Finally, back in the

Unable to connect Android phone to my project with Expo

感情迁移 提交于 2020-03-18 05:48:08
问题 I created my project in react native by CLI: _npm install -g create-react-native-app _create-react-native-app AwesomeProject _cd AwesomeProject _npm start Then I installed expo in my Android phone, and scanned a QR code on my computer screen. However, my phone can't connect to project, and I don't know why. It just loads and fails. This is error message: Could not load exp:// 192.168.56.1:19000. Network response timed out. This is view error: "Uncaught Error: java,not.SocketTimeoutException:

Encrypting sensivite data in React Native and Expo

痞子三分冷 提交于 2020-02-29 17:52:11
问题 I`m working on mobile app with React Native and Expo, providing security solutions. Project owner want to store in app sensitive authorization keys, used to contact with REST server and access to secured data. He demand to have this keys at least encrypted, and hard to read from outside as much as possible. I know about topis: Save sensitive data in React Native Is React Native's Async Storage secure? and about KeyChain , but they dont cover encyption and expo issues. So with is the best and

React-Navigation adding drawer navigation with tab

☆樱花仙子☆ 提交于 2020-02-27 12:16:39
问题 I'm using react-navigation ("^3.0.9") with expo. This is my logic flow: TabView(BottomTabNavigator) with StackNavigatior: HomeStack --HomeScreen ... LinksStack --LinkScreen ... SettingsStack -- Aboutscreen ... Everything works ok, but now I would like to add a drawer navigation (hamburger menu) as follows: DrawerNavigation View --HomeScreen(which will show HomeScreen with 3 tabs) --Screen2 (no tabs) --Screen3 (no tabs) Which I tried to do the following: export const Tab =

Unable to install Expo CLI through NPM

最后都变了- 提交于 2020-02-06 08:48:45
问题 All was working fine and I was running Expo version 3.11.5, but the log said to update it to 3.11.7. I ran that command and it ruined my project. Please find the error logs below. PS C:\Users\MY PC\My_React_Native\fruits-vegetables> npm install --global expo-cli npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are

react-navigation, how to close the drawer menu when clicking on the overlay?

允我心安 提交于 2020-02-05 04:22:40
问题 I am running the react-native-paper example app on the web. For this, I have replaced in the render: <PaperProvider theme={theme}> <SafeAreaProvider> <PreferencesContext.Provider value={preferences}> <React.Fragment> <NavigationNativeContainer initialState={initialState} onStateChange={state => AsyncStorage.setItem(PERSISTENCE_KEY, JSON.stringify(state)) } > - {Platform.OS === 'web' ? ( - <App /> - ) : ( <Drawer.Navigator drawerContent={() => <DrawerContent />}> <Drawer.Screen name="Home"