react-native-android

Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'

孤街浪徒 提交于 2019-12-04 03:32:41
问题 I am fixing a incompatibility issue related to AndroidX by adding 2 lines to gradle.properties under android for my RN 0.59 project. android.useAndroidX=true android.enableJetifier=true Now there is another error with run-android related to react-native-gesture-handler . Then I yarn remove the current react-native-gesture-handler of 1.2.0 and add it back. The new version is 1.3.0 . Here is the error: > Task :react-native-gesture-handler:compileDebugJavaWithJavac C:\D\code\js\emps_app\node

React-native - Build failed due to double-conversion

纵然是瞬间 提交于 2019-12-04 03:31:54
I have created new react-native project through terminal. react-native init PlayWithAnimation when I run the react-native app through Xcode. I got this error. /bin/sh -c \"/Users/sumit/Desktop/React\ Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh\" /Users/sumit/Desktop/React >Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 2: cd: /Users/sumit/Desktop/React: No such file or directory /Users/sumit/Desktop/React >Native

Arrow functions with async and await in react native

我是研究僧i 提交于 2019-12-04 02:58:56
问题 I am trying to save data in AsyncStorage in react-native . I want to save it asynchronous so using async and await keyword. async onPositiveClickListener = () => { // user has completed product tour_end try { await AsyncStorage.setItem("@ProductTour:key", "true"); const { navigate } = this.props.navigation; navigate("DashboardScreen"); } catch (error) { console.log(error); } }; I am getting an error while saving program SyntaxError: Unexpected token, expected ( (40:32) 38 | }; 39 | > 40 |

occurred configuring project ':app'. > Failed to notify project evaluation listener

牧云@^-^@ 提交于 2019-12-04 01:47:59
I would like to start my first application react-native but when i write in the command line "react-native run-android" it say : What went wrong: A problem occurred configuring project ':app'. > Failed to notify project evaluation listener. > javax/xml/bind/annotation/XmlSchema Does anyone know what could be the problem? I had this same issue and it was due to having two versions of JDK installed v8 & v9. By removing v9, I was able to resolve the issue (Mac User). If you only have version 9 installed, I would remove it and try v8. Navigate to /Library/Java/JavaVirtualMachines and remove the v9

android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c745883 - permission denied

喜夏-厌秋 提交于 2019-12-04 01:01:38
Here's my stack trace: 01-30 15:11:41.037 13010-13010/project.app E/AndroidRuntime: FATAL EXCEPTION: main Process: project.app, PID: 13010 android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c745883 -- permission denied for window type 2003 at android.view.ViewRootImpl.setView(ViewRootImpl.java:789) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) at android.app.Dialog.show(Dialog.java:330) at com.facebook.react.devsupport.DevSupportManagerImpl$4.run

How can I call method from onPress on Alert function [React-Native]

萝らか妹 提交于 2019-12-04 00:14:35
How can I call method from onPress on Alert function [React-Native] <Button onPress={{() => Alert.alert( 'Alert Title', 'alertMessage', [ {text: 'Cancel', onPress: () => console.log('Cancel Pressed!')}, {text: 'OK', onPress: () => {this.onDeleteBTN}}, ], { cancelable: false } )}} > <Text> Delete Record </Text> </Button> After OK button on Alert Dialog I need to call onDeleteBTN = () => { alert(' OnDelete'); } {text: 'OK', onPress: () => {this.onDeleteBTN.bind(this)}}, {text: 'OK', onPress: () => {this.onDeleteBTN}}, It's not work First issue, the Button component has a title prop instead of

How to import react native project in android studio

时光总嘲笑我的痴心妄想 提交于 2019-12-03 23:18:27
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.ReactApplicationContext; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge

React Native Android location request timed out

坚强是说给别人听的谎言 提交于 2019-12-03 22:32:20
In IOS there isn't a problem while looking for gps coords. It works fine. On Android side its not stable as IOS. This problem both in real device and emulator. Sometimes it can find location, but sometimes not. Looking for 3days but there wasn't find a solution. When my app cannot find my location, I tried via Google Maps app, it works like charm. Here is my code for both IOS and Android; getCurrentPosition() { navigator.geolocation.getCurrentPosition( (position) => { this.setState({ initialPosition: position }); alert(JSON.stringify(position)) var coords = new Coords(); coords.Latitude =

React Native FlatList - Variable columns

℡╲_俬逩灬. 提交于 2019-12-03 20:39:42
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": "product", "name": "And Another Product", "description: "yadda yadda" }, { "type": "product", "name":

How To Drag and Drop with Multiple View in React Native?

前提是你 提交于 2019-12-03 19:19:27
问题 I have added multiple view in the dynamically at same position also added the pan Gesture each of the views. The all view at the same position so that it override. My problem is that when wants to drag the last view, but it's dragged all views. How can drag the individual view. Here you can see GIF in which all views. View1 , View 2 and View 3. All are dragging. I want to only view 3 is draggable, others drags after completion of drag 3. 1. Drag 3 - First drag. 2. Drag 2 - Second drag. 3.