react-native-android

KeyboardAvoidingView not Working Properly

故事扮演 提交于 2019-11-28 19:11:19
KeyboardAvoidingView not Working Properly I am trying to use the KeyboardAvoidingView with behavior="padding" . For some reason, when I'm trying to enter any text in TextInput , there's a space below the TextInput. Attached is a picture of what is happening as well as the code. Any chance anyone has any idea whats happening here? render() { return ( <KeyboardAvoidingView style={{ flex: 1}} behavior="padding"> < View style={{ flex: 1, backgroundColor: "#FFFFFF", }} > <ScrollView contentContainerStyle={{ justifyContent: "flex-end", flex: 1 }}> <ChatInfo /> </ScrollView> <View style={styles

Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

馋奶兔 提交于 2019-11-28 19:09:34
I've setup the environment for react native on Windows. But when I run the command react-native run-android I get the following errors - * What went wrong: A problem occurred configuring project ':app'. > Failed to notify project evaluation listener. > Could not initialize class com.android.sdklib.repository.AndroidSdkHandler How do I fix this? I encountered this error while running the following command in macOS ./gradlew assembleRelease --stacktrace and got the exact error posted. I solved the problem by setting $JAVA_HOME environment variable to your JDK installation. In my case I used the

64 bit version issue in react-native android app by google play store

夙愿已清 提交于 2019-11-28 18:39:37
According to https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html : In August 2019, Play store will require that new apps and app updates with native libraries provide 64-bit versions in addition to their 32-bit versions. I have a React Native application (which includes native code). My question is how can I know whether a third party library I'm using or even my own code is not supporting 64-bit? And how can I fix it? Update I added x86_64 to my build.gradle and I now see the x86_64 folder in the apk but I think some of the files are missing. Here is,

Reload a React Native app on an Android device manually via command line

我是研究僧i 提交于 2019-11-28 18:31:30
I'd like to manually force a Reload of my React Native app on demand without physically shaking the device. (I'm getting carpal tunnel.) I know that Live Reload / Hot Reload are available. I'm looking for a on-demand command line solution. brettlaforge Using the cmd line you can send a command to the Android device. adb shell input text "RR" This command tells the Android device to type the character "R" twice which is the React Native command to Reload on Android. The adb shell command has many useful features many of which are described here: ADB Shell Input Events To open the developer menu

React native run-android do not updating modified code

只谈情不闲聊 提交于 2019-11-28 17:51:32
I am using React native 0.52.0 and react-native-cli 2.0.1 on my Windows PC for android development. Despite all the changes i have made. When I run react-native run-android , it builds successfully but when I run it, I get the default react native screen. The result when I run react-native run-android - The app I get- index.js import { AppRegistry } from 'react-native'; import App from './App'; AppRegistry.registerComponent('albums', () => App); app.js import React from 'react' import ReactNative, { Text } from 'react-native' export default const App = () => { return ( <Text>Hello World</Text>

Get current location, latitude and longitude in ReactNative using react-native-maps

徘徊边缘 提交于 2019-11-28 17:33:24
问题 I am developing a map location. When I click in some particular place I get the latitude and longitude, but not the current location, latitude and longitude. I don't know how to find out. How can I get them and how can I put the marker at that position? Here is my code: class Maps extends React.Component { constructor(props) { super(props); this.state = { region: { latitude: LATITUDE, longitude: LONGITUDE, latitudeDelta: LATITUDE_DELTA, longitudeDelta: LONGITUDE_DELTA, }, marker: { latlng:{

Change package name for Android in React Native

风格不统一 提交于 2019-11-28 14:59:15
I used react-native init MyApp to initialise a new React Native app. This created among others an Android project with the package com.myapp . What's the best way to change this package name, for example to: com.mycompany.myapp ? I tried changing it in AndroidManifest.xml but it created other errors, so I'm assuming it's not the way. Any idea? I've changed project' subfolder name from: " android/app/src/main/java/MY/APP/ OLD_ID / " to: " android/app/src/main/java/MY/APP/ NEW_ID / " Then manually switched the old and new package ids: In: android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java

React native expection java.lang.UnsatisfiedLinkError: dlopen failed: “/data/data/{package}/lib-main/libgnustl_shared.so” is 32-bit instead of 64-bit

我的未来我决定 提交于 2019-11-28 12:02:50
I am trying to integrate React Native with my existing Android App. I am getting the following exception, when initilizing React Native Screen: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.snapdeal.main/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit The App is only crashing on 64-bit devices. As per my learning so far, I've found this issue reported on React Native Repo, but the solution suggested in this thread is not helpful as I am not using any external SO library in existing App. Apart from above, I've realized another difference in library structure on the

can't create project using react-native init

六眼飞鱼酱① 提交于 2019-11-28 11:22:55
问题 I am getting this error again and again when creating a new project using react-native init. I reinstalled react-native cli and tried again but no luck. Can someone please tell me is there anything I can do? I have following versions installed react-native-cli: 2.0.1 react-native: 0.56.0 node: 10.6.0 npm: 6.1.0 回答1: This error is may be because of react native version React native 0.56 Here is the link about the discussion of this issue React native 0.56.* - "Unexpected identifier" So they

Linking with android os settings in react native

ε祈祈猫儿з 提交于 2019-11-28 10:04:20
I'm trying to link with android os settings page. Going to Phone Dail with Linking is work. Linking.openURL('tel: +959 XXXXXXXX'); Can I use Linking to link with android os settings page like android location settings page? Linking.openURL can only open correctly formatted urls. There are no standardized urls for the android settings . You would have to write some native code to do this, and then build a React Native Module to trigger it. Here is some example Android code: public void openWifiSettings() { Intent intent = new Intent(Intent.ACTION_WIFI_SETTINGS); if (intent.resolveActivity