react-native-android

Sharing Realm instance between React Native and Android

落爺英雄遲暮 提交于 2019-12-10 10:22:00
问题 I'm working on a React Native project that uses Realm for React Native. It works without problems but now, I am faced with a problem of writing Android Service that would use the same Realm instance. Is it possible and how would I do that? 回答1: I think you can communicate from Java to React Native through Native Modules and do your Realm-related code in Javascript as you normally would. Otherwise, Realm for Android's multi-process support for non-encrypted Realms will arrive in Realm-Java 2.0

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 }

Select a row in ListView react-native to get detail

谁说我不能喝 提交于 2019-12-10 04:54:53
问题 i'm new in react-native. I saw an example in https://facebook.github.io/react-native/docs/sample-application-movies.html . It is building a movies app that fetch movies and display them in a ListView. How can we select a row to get its detail data and display it in other view? Please help. thanks :) Here's what i've done so far: /** * Sample React Native App * https://github.com/facebook/react-native */ import React, { Component, } from 'react'; import { AppRegistry, Image, ListView,

ReactNative ListView inconsistent separator lines

你。 提交于 2019-12-10 04:03:13
问题 On Android 4.4, ListView separator lines are inconsistent in thickness, and some do not render. I can't see how this can be a code issue, this is how I render them: separator: { height: 1, backgroundColor: 'grey', } ... <ListView renderSeparator={(sectionID, rowID) => <View key={`${sectionID}-${rowID}`} style={styles.separator} /> } .../> Here is a screenshot of a View with this problem: This issue does not happen on iOS or Android 6. Anyone had this problem before? Update I did a test, this

Go back to debugging after created release version with react-native bundle (Android)

别等时光非礼了梦想. 提交于 2019-12-09 19:18:01
问题 So I have created my Application using React native and just produced my first release-build. My problem now is that I can't get back to react natives debug-mode. By following the documentation, this is what i did. react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/ This code generated the bundled index.android.bundle and index.android.bundle.meta Now every time I execute react-native run-android , the javascript code

Android app link not working after the application is made live in play store

♀尐吖头ヾ 提交于 2019-12-09 18:34:22
问题 I have implemented Android app links based on the below links. https://developer.android.com/studio/write/app-link-indexing.html https://developer.android.com/training/app-links I have hosted assetlinks file into our domain https://ourdomain/.well-known/assetlinks.json And also I have verified this using https://developers.google.com/digital-asset-links/tools/generator and from android studio's App Links Assitant also. and got verified status from both the ways. Now when I generate a signed

ACCESS_FINE_LOCATION not working

风格不统一 提交于 2019-12-09 18:16:36
问题 The following is my AndroidManifest.xml ... <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" /> <application android:name=".BeaconApp" android:allowBackup="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme">

Trying to add MultiDex support - cannot find symbol context and MultiDex

倖福魔咒の 提交于 2019-12-09 17:19:21
问题 After following the instructions mentioned at: https://developer.android.com/studio/build/multidex.html#mdex-gradle I am getting an error cannot find symbol class Context variable context and variable MultiDex . package com.mycompany.mypackage; import android.app.Application; import android.util.Log; import com.facebook.react.ReactApplication; import com.slowpath.hockeyapp.RNHockeyAppModule; import com.slowpath.hockeyapp.RNHockeyAppPackage; import com.microsoft.codepush.react.CodePush; import

React-native - Build failed due to double-conversion

a 夏天 提交于 2019-12-09 16:24:21
问题 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

Debug native java code in react-native

爱⌒轻易说出口 提交于 2019-12-09 16:02:11
问题 Is there a way to debug native java code for Android app built using react-native . Specifically, I want to debug a third party Android package that I am using in my react-native app. There are may blog posts and stackoverflow questions on how to debug the js code but I didn't find any post describing how to debug native java code. I tried to just import the third party Android package into Android Studio and tried to run it in debugger but nothing really happened which I kind of expected.