My costumer uses Firebase as database which is restricted in his country.
How can i modify and set a Proxy to access a restricted database?
How can i do that ?
I don't have any idea about it Any comments and suggestions are appreciated.
My costumer uses Firebase as database which is restricted in his country.
How can i modify and set a Proxy to access a restricted database?
How can i do that ?
I don't have any idea about it Any comments and suggestions are appreciated.
I am using RNFirebase notification package ref. https://rnfirebase.io/docs/v4.3.x/messaging/introduction
i have follow all the steps mentioned in the documentation, RNfirebase handle the incomming notification by itself so need to implement extra module rf. https://rnfirebase.io/docs/v4.3.x/notifications/introduction this only help when app is foreground
issue
as shown in above image the icon is perfectly visible when notification come form cloud. but when i open the notification tray
you can clearly see that icon is gray out (i have searched the issue and removed the alpha channel from the icon ) still the issue is same.
ref 1. https://github.com/zo0r/react-native-push-notification/issues/730 ref 2. Why is my smallIcon for Notifications always greyed out? ref 3.
See this link (as I suspected) has the POM file and no jar.
Important Notes:
The distribution url is:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Here is the error
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'AwesomePlacesApp'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
I need to exit app when a certain button click. BackHandler.exitApp() working well on android, but not working on ios.
I think react-native-exit-app is best solution. But it have null object error. How to exit app in react native? If anyone know the solving then please advance me. Thanks
Trying to run detox on my android device and running into the following error:
> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from /Users/m/Desktop/alohapass-business/node_modules/react-native/android
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileStagingDebugAndroidTestJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:stagingDebugAndroidTestCompileClasspath'.
> Could not find any matches for com.wix:detox:+ as no versions of com.wix:detox are available.
Required by:
project :app
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
I have androidTestImplementation('com.wix:detox:+') { transitive = true } in my build.gradle and am running ./gradlew assembleAndroidTest.
Any ideas?
I tried to use react-native-maps and get my current location. I tried to use not only 'react-native-geolocation-service' and '@react-native-community/geolocation'. Map still indicate google HQ maybe in San Francisco. ({"coords": {"accuracy": 20, "altitude": 5, "heading": 0, "latitude": 37.4219983, "longitude": -122.084, "speed": 0}, "mocked": false, "timestamp": 1577294172000})
How can I load my current location in my android emulator(Pixel_2 & Pixel_3). Please answer to me... I've been wrestling for over a week...
Below is my packages.
"dependencies": {
"@react-native-community/geolocation": "^2.0.2",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-android-location-enabler": "^1.2.0",
"react-native-geolocation-service": "^3.1.0",
"react-native-maps": "0.26.1"
},
import React, {Component} from 'react';
import {StyleSheet, Text, View, Button, Alert, TextInput,
TouchableWithoutFeedback,
TouchableHighlight, TouchableOpacity,
Keyboard, ScrollView, PermissionsAndroid,
} from 'react-native';
import MapView, {Marker} from 'react-native-maps';
import Geolocation from 'react-native-geolocation-service';
// import Geolocation from '@react-native-community/geolocation';
import RNAndroidLocationEnabler from 'react-native-android-location-enabler';
Geolocation.getCurrentPosition(
(position) => {
console.log(position);
},
(error) => {
// See error code charts below.
console.log(error.code, error.message);
},
{ enableHighAccuracy: true, timeout: 15000, maximumAge: 10000 }
);
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<MapView
minZoomLevel={6}
maxZoomLevel={16}
// mapType="none"
style={styles.map}
initialRegion={{
// latitude: this.state.location.coords.latitude,
// longitude: this.state.location.coords.longitude,
latitude: 37.4219983,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}>
<Marker
coordinate={{latitude: 37.78825, longitude: -122.4324}}
title="this is a marker"
description="this is a marker example"
/>
</MapView>
<Text style={styles.SampleHeader}>
GUDUGUDU ^^
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
SampleHeader: {
// flex: 3,
// flexDirection: 'column',
backgroundColor: '#d9d9d9',
// width: 90,
paddingTop: 0,
paddingBottom: 5,
marginLeft: 15,
marginRight: 15,
marginTop: 5,
marginBottom: 5,
textAlign: "center",
// fontFamily: 'Cochin',
fontSize: 22,
fontWeight: '300',
color: 'black',
padding: 5,
borderRadius: 10,
},
container: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
justifyContent: 'flex-end',
alignItems: 'center',
},
map: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
});
'''
I've got an absolute positioned View that holds 3 TouchableOpacity components and the 3 fail to respond they are just not working at all, what is going wrong here please help me :)
Code
<View style={[styles.highNormalLowDocListHeaderStateContainer, {width: this.windowWidth, height: this.headerSmallHeight, position: 'absolute', left: 0, top: floatedHeaderTitleTop, elevation: 2}]}>
<TouchableOpacity onPress={() => this.getDocuments('high')} style={[styles.highNormalLowDocListHeaderStateTextContainer, highSelected.borderStyle]}>
<Text style={[styles.highNormalLowDocListHeaderStateText, highSelected.textStyle]}>HIGH</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => this.getDocuments('normal')} style={[styles.highNormalLowDocListHeaderStateTextContainer, normalSelected.borderStyle]}>
<Text style={[styles.highNormalLowDocListHeaderStateText, normalSelected.textStyle]}>NORMAL</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => this.getDocuments('low')} style={[styles.highNormalLowDocListHeaderStateTextContainer, lowSelected.borderStyle]}>
<Text style {[styles.highNormalLowDocListHeaderStateText, lowSelected.textStyle]}>LOW</Text>
</TouchableOpacity>
</View>
Screenshot
Am trying to run react native using react-native run-android but I get the above error. I was having issues getting my detached expo to run on android emulator and I keep getting this error Error running app. Have you installed the app already using Android Studio? Since you are detached you must build manually. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=....
After hours of futile effort i tried running react-native run-android but I keep getting the above error (title). solution online spawnSync ./gradlew EACCES error when running react native project on emulator udara shows its a permission issue and that it can be resolved with
chmod 755 android/gradlew
since am using a windows system i tried
ICACLS "android/gradlew" /grant:r "Administrator:(F)" /C
but I still get the same error. am not really good with icacls so I may be wrong. any assistance is highly appreciated.
My emulator is working perfectly cause i did a adb devices check and its their. I even have the emulator already open on my window
Whenever I run react-native run-android while keeping the emulator running, I get this error. react-native run-ios wroks completely fine.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Failed to parse React Native CLI configuration: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
The current character read is 'E' with an int value of 69
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
Error: Invalid attribute nameLine: 16Column: 18Char: . at error (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:651:10) at strictFail (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:677:7) at SAXParser.write (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/sax/lib/sax.js:1313:13) at new XmlDocument (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/xmldoc/lib/xmldoc.js:261:15) at readManifest (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:38:10) at Object.projectConfig (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/build/config/index.js:59:46) at Object.get project [as project] (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/index.js:114:50) at /Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/config/config.js:8:452 at Array.forEach (<anonymous>) at _objectSpread (/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/config/config.js:8:392)
^
FAILURE: Build failed with an exception.
* Where:
Script '/Users/yashatreya/Desktop/Realyze/Realyze/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 201
* What went wrong:
A problem occurred evaluating script.
> Failed to parse React Native CLI configuration. Expected running 'npx --quiet --no-install react-native config' command from '/Users/yashatreya/Desktop/Realyze/Realyze' directory to output valid JSON, but it didn't. This may be caused by npx resolving to a legacy global react-native binary. Please make sure to uninstall any global 'react-native' binaries: 'npm uninstall -g react-native react-native-cli' and try again
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
As indicated in the error message, I tried running npm uninstall -g react-native react-native-cli but it didn’t work.
Info about my environment:
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 29.68 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.13.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: ^0.61.4 => 0.61.4
npmGlobalPackages:
react-native-cli: 2.0.1
android/app/build.gradle below:
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.realyze"
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
}
// rootProject.ext.minSdkVersion
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation project(':react-native-push-notification')
implementation project(':react-native-sound')
implementation project(':react-native-audio')
implementation 'com.android.support:multidex:2.0.1'
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation project(path: ":@react-native-firebase_auth")
implementation project(path: ":@react-native-firebase_messaging")
implementation project(path: ":@react-native-firebase_database")
implementation project(':react-native-datetimepicker')
implementation project(path: ":@react-native-firebase_firestore")
implementation project(path: ":@react-native-firebase_functions")
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
// }
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'android/build.gradle below :
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.2"
classpath 'com.google.gms:google-services:4.3.2'
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
Initially I was getting this error: react-native build error: Could not find method implementation() for arguments [jscFlavor] on project ':app' of type org.gradle.api.Project but now I am getting the above.
I have an apk released in playstore which is built using React-Native. Now, I wanted to build the same project using the Android Studio. The package name and app id is same, the keystore is also same. But, whenever I try to install a newer apk (built with Android Studio) over the old apk(built with React-Native) it says apk is not installed.
Is there someone faced the same same problem? Or, may some one can help me there? Thanks a lot in advance.
I'm using react-native wrapper for google sms-retriever api on Android with redux-saga eventChannel, to subscribe to external events, like so:
import { eventChannel } from 'redux-saga';
import { take, call } from 'redux-saga/effects';
import SmsRetriever from 'react-native-sms-retriever';
function createOnOTPChannel() {
return eventChannel((emit) => {
SmsRetriever.addSmsListener((event) => {
console.log('received event in channel');
emit(event.message);
});
return () => {
console.log('removing');
SmsRetriever.removeSmsListener();
};
});
}
function* watchOTP() {
const registered = yield SmsRetriever.startSmsRetriever();
if (registered) {
const otpChannel = yield call(createOnOTPChannel);
while (true) {
const payload = yield take(otpChannel);
console.log(payload);
}
}
}
export default watchOTP;
However, only the first sms with OTP gets received and emitted, all the following messages get ignored, while listener is never killed (i.e. removing never gets logged).
I'm fairly unacquainted with redux-saga and this eventChannel is simply following the example in the docs.
What I fail to realize - is there an issue with react-native-sms-retriever library, redux-saga or my implementation? And how to make it works as expected, of course
I am trying to run my react native application on Android and when I try
react-native run-android
I get the following error:
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
I have already tried cleaning Gradle.
>>cd android
>>./gradlew clean
After that I did npm install which gave me some warnings but no errors.
And then when i did react-native run-android it gave me an error. Could you please suggest what might be causing this to happen.
here is the full log.
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app> cd .\android\
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app\android> ./gradlew clean
Incremental java compilation is an incubating feature.
:app:clean
BUILD SUCCESSFUL
Total time: 12.533 secs
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app\android> react-native run-android
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app\android> npm install
npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps@7.3.0 requires a peer of react@15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps@7.3.0 requires a peer of react-dom@15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-native@0.55.4 requires a peer of react@16.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-maps@0.21.0 requires a peer of react-native@^0.51 || ^0.52 || ^0.53 || ^0.54 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-web-maps@0.1.0 requires a peer of react-native-web@* but none is installed. You must install peer dependencies yourself.
npm WARN react-prop-types-element-of-type@2.2.0 requires a peer of react@^0.14.6 || ^15.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-ia32@2.2.8 (node_modules\@expo\ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-ia32@2.2.8: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-ia32@2.2.8 (node_modules\@expo\ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-ia32@2.2.8: wanted {"os":"freebsd","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-x64@2.2.8 (node_modules\@expo\ngrok-bin-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-x64@2.2.8: wanted {"os":"darwin","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm@2.2.8 (node_modules\@expo\ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-arm@2.2.8: wanted {"os":"linux","arch":"arm"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-x64@2.2.8 (node_modules\@expo\ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-x64@2.2.8: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm64@2.2.8 (node_modules\@expo\ngrok-bin-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-arm64@2.2.8: wanted {"os":"linux","arch":"arm64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-ia32@2.2.8 (node_modules\@expo\ngrok-bin-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-ia32@2.2.8: wanted {"os":"linux","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-x64@2.2.8 (node_modules\@expo\ngrok-bin-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-x64@2.2.8: wanted {"os":"linux","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-sunos-x64@2.2.8 (node_modules\@expo\ngrok-bin-sunos-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-sunos-x64@2.2.8: wanted {"os":"sunos","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-win32-ia32@2.2.8-beta.1 (node_modules\@expo\ngrok-bin-win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: wanted {"os":"win32","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 12.877s
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app\android> react-native run-android
Command `run-android` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app\android> cd..
PS C:\Development\Dopay-Retail-ReactNative\retail-native-app> react-native run-android
Scanning folders for symlinks in C:\Development\Dopay-Retail-ReactNative\retail-native-app\node_modules (57ms)
(node:3392) ExperimentalWarning: The fs.promises API is experimental
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportSupportV42301Library
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:app:prepareComFacebookFrescoDrawee130Library
:app:prepareComFacebookFrescoFbcore130Library
:app:prepareComFacebookFrescoFresco130Library
:app:prepareComFacebookFrescoImagepipeline130Library
:app:prepareComFacebookFrescoImagepipelineBase130Library
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library
:app:prepareComFacebookReactReactNative0554Library
:app:prepareComFacebookSoloaderSoloader010Library
:app:prepareOrgWebkitAndroidJscR174650Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 25.038 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
My goal is to get ONLY numeric keyboard without punctuation. number-pad is not working properly on every device and it also allows to enter symbols "-, _." that is not what I want. I noticed that when secureTextEntry is set to true on TextInput the keyboard is just the one I want, but I can't use it like this because my text is getting masked. So I wonder is there a way to use that keyboard without masking the text? Maybe a hack in the native code exists?
The screen of desired keyboard

NUMBER-PAD IS NOT WORKING ON EVERY DEVICE!
THIS IS NUMBER-PAD ON HONOR 8X

This is my first time working with react native. It works fine when I run react-native run-ios but when I try to run it on android using react-native run-android it's gives an error:

As you can see in the picture above I've an Android Emulator running in the background but still it gives this error.
how can I navigate between AppContainers?
I'm detecting a correct stack in App.js
const stack = User.isAuthorized() ? authStack : unauthStack;
After user enter the login and password, he need switch the stack from unauthStack.SignIn to authStack.List.
const unauthStack = createAppContainer(createStackNavigator({
SignIn: { screen: SignIn },
ForgotPassword: { screen: ForgotPassword },
}));
const authStack = createAppContainer(createBottomTabNavigator({
List: { screen: GeneralStack },
Add: { screen: NewEventStack },
}));
I've tried to Google it but can't find any working examples. And saw some information that complete reload the app could be a reason of memory leak or something like that...
So what's the correct way to do this?
I am newbie in React Native. I would like to add in footer bar in my App. Here is my full code in dashboard.js file but it does not work:-
import React, { memo } from 'react';
import Background from '../components/Background';
import Logo from '../components/Logo';
import Header from '../components/Header';
import Paragraph from '../components/Paragraph';
import Button from '../components/Button';
import {Container, Footer, Title, Icon} from 'native-base';
const Dashboard = ({ navigation }) => (
<Background>
<Logo />
<Header>Let’s start</Header>
<Paragraph>
Your amazing app starts here. Open you favourite code editor and start
editing this project.
</Paragraph>
<Button mode="outlined" onPress={() => navigation.navigate('HomeScreen')}>
Logout
</Button>
**<Container>
<Footer>
<Button transparent>
<Icon size={30} color={'#fff'} name={'ios-telephone'} />
</Button>
<Title>Footer</Title>
<Button transparent >
<Icon size={25} color={'#fff'} name={'chatbox'}/>
</Button>
</Footer>
</Container>**
</Background>
);
export default memo(Dashboard);
The error show that the fontfamily issue caused in native-base.
Therefore, I did some research and getting this solution.
async componentDidMount() {
await Font.loadAsync({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
});
this.setState({ isReady: true });
}
But I have no idea how to add this in my code, anyone can help for this? Appreciated.
I am trying to call from my app. But it is opening the phone dialer.
Linking.openURL(tel:${phoneNumber});
It triggers for me though. But it doesn't get the notification data correctly, I've got undefined if it got when it goes background
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen: NotificationOpen) => {
// Get the action triggered by the notification being opened
const action = notificationOpen.action;
// Get information about the notification that was opened
const notification: Notification = notificationOpen.notification;
alert(notification.body);
firebase.notifications().removeDeliveredNotification(notification.notificationId);
});
I built new React Native project yesterday using react-native-cli. But when running the project with my android phone, I got this error in red screen.
Invariant Violation: WebView has been removed from React Native. It can now be installed and imported from 'react-native-webview' instead of 'react-native'. See 'https://github.com/react-native-community/react-native-webview'.
I never used WebView and here is my "package.json".
{
"name": "",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-image-slider": "^2.0.3",
"react-native-svg": "^9.13.6",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-stack": "^1.10.3",
"react-redux": "^7.1.3",
"redux": "^4.0.4"
},
"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/runtime": "^7.7.6",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.7.2",
"install-peers": "^1.0.3",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.57.0",
"react-native-gesture-handler": "^1.5.2",
"react-native-reanimated": "^1.4.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}
I tried to fix this problem for a whole day but I couldn't. I just think 'react-native-gesture-handler' causes this problem. Anyone who has much experience of React-Native, please help me. Thank you.
Some icon and gif not all icon and gif sometimes wont see android sdk 19 and lower devices, I tried to change fresco version in build.gradle but did not work my fresco version is:
implementation 'com.facebook.fresco:fresco:1.12.0'
implementation "com.facebook.fresco:animated-gif:1.12.0"My RN version is 0.59.1