react-native-android

“Super expression must either be null or a function, not object” error

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 02:12:43
问题 I use example code from https://github.com/realm/realm-js/blob/master/examples/ReactExample/components/realm.js. 'use strict'; import Realm from 'realm'; class Todo extends Realm.Object {} Todo.schema = { name: 'Todo', properties: { done: {type: 'bool', default: false}, text: 'string', }, }; class TodoList extends Realm.Object {} TodoList.schema = { name: 'TodoList', properties: { name: 'string', items: {type: 'list', objectType: 'Todo'}, }, }; export default new Realm({schema: [Todo,

React Native Android: Generating Signed APK through Android Studio doesn't include JS Bundle

烈酒焚心 提交于 2019-12-12 22:21:50
问题 Generating Signed APK through Android Studio doesn't include JS Bundle. I have been struggling install the release build on device it was not working. finally i enabled the debugging for Release build and i find out that Generated signed apk through android studio doesn't include js bundle. How can i generate a signed apk including js bundle? to upload to play store. 回答1: I found it on RN documentations : Creating a release build in Android Studio You can use Android Studio to create your

Illegal reflective access operation

左心房为你撑大大i 提交于 2019-12-12 20:45:03
问题 I'm trying to figure out why React Native suddenly will not work on my 2014 era Macbook. It was working earlier in August. I get the following error when trying to run react-native run-android from the command line. The app runs when I open it in Android Studio 3.0 just fine, no errors. Any ideas what I can look at to resolve this? Scanning 563 folders for symlinks in /Users/username/ReactNative/Wtf/node_modules (5ms) JS server already running. Building and installing the app on the device

Push notification not working when application is closed

走远了吗. 提交于 2019-12-12 20:17:23
问题 I am working in react native project where I required to have push notification from server to be implemented in my app. I tried to use firebase as the notification provider. For that, I used react-native-firebase package. I tried this example link Its working fine when the app is running. But notification failed to come when the app is closed. So how can I achieve this My target Android version is KitKat 回答1: Recently i face this problem i solve this issue by autostart Ref : https://docs

Can not get expo push token on Android

北城余情 提交于 2019-12-12 20:07:36
问题 I am building a React native app which is based on Expo and I want to also take advantage of Expo's push notification capabilities in a combination with Firebase realtime database. I am basically following the steps being described here. Everything was going pretty well before reaching the part where push notification token has to be extracted. registerForPushNotificationsAsync = async (userInfo) => { // ... Stuff // Get the token that uniquely identifies this device let token = await

Could not find com.android.support:multidex-instrumentation:27.1.1

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 19:53:11
问题 I followed the instructions on the https://developer.android.com/studio/build/multidex Here is my error code. Execution failed for task ':app:lintVitalRelease'. Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'. Could not find com.android.support:multidex-instrumentation:27.1.1. But i am geeting the same issue when trying the get signed apk here is the my dependicies: defaultConfig { applicationId "com.myproject" minSdkVersion rootProject.ext

How to use SVG-Uri in React-native or Expo?

泄露秘密 提交于 2019-12-12 18:34:04
问题 I downloaded the expo-svg-uri module to use the Svg image. But the image doesn't come out right. Code I failed: <View style={styles.container}> <SvgUri width="200" height="200" source={require("../../image/minigroup.svg")} /> </View> Failed Image Original Image this is my svgfile <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="183" viewBox="0 0 80 183"> <defs> <circle id="b" cx="35" cy="35" r="35"/> <filter id="a" width="142.9%" height=

react-native-pdf-view - How to populate pdfView with base64 or blob

最后都变了- 提交于 2019-12-12 14:53:10
问题 I am using the react-native-pdf-view library and I am having trouble populating the PDFView with a pdf. How my project works is that I receive a base64 pdf from the server where I then save to the android file system by using the library react-native-fs like so: (This works fine) saveFile(filename){ var base64Image = this.state.imageBase64; // create a path you want to write to var path = RNFS.DocumentDirectoryPath + '/' + filename; // write the file RNFS.writeFile(path, base64Image, 'base64'

Duplicate entry: okhttp3/internal/ws/RealWebSocket$1.class

╄→尐↘猪︶ㄣ 提交于 2019-12-12 12:45:45
问题 I am using LeanCloud as my push notification service provider but somehow when I run my app it gives me this error. Below is my dependencies: dependencies { compile 'com.android.support:multidex:1.0.1' compile project(':react-native-push-notification') compile project(':react-native-svg') compile project(':react-native-fbsdk') compile project(':react-native-picker') compile project(':react-native-maps') compile project(':react-native-wechat') compile project(':react-native-code-push') compile

How to disabled screenshoots in react-native app?

假装没事ソ 提交于 2019-12-12 12:02:45
问题 I have made a mobile app using react-native (only android for now and it is not an expo app) and I would like to forbid users to take screenshots while the app is open. I know it is impossible to disable this completely but I would like to make it at least more difficult to take screenshots. There are some examples I found but I don't how to implement them for example: How to prevent Screen Capture in Android I tried to put: getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,