Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 28476 articles
Browse latest View live

Text is getting cut off in android for react native

$
0
0

I am working on React native and I am new to this. I am trying to display text, But, It's showing in an android end of the text ... and not showing complete text. It's only happening in android, working fine in iOS.

I have written following code

<Text    numberOfLines={1}    adjustsFontSizeToFit    minimumFontScale={0.1}    style={labelStyle} //labelStyle nothing I have written></Text>

Can anyone suggest me, where I am doing wrong in the code?

enter image description here


Subscription status Android and iOS with react native

$
0
0

I'm developing an application with react native that will work with in app purchase payments for subscriptions. I tried to find how to manage the subscriptions in both platforms, and I found that Apple notify status changes to your server. My problem appears with Android, I only found an API to make requests. There is some service from Android like the Apple's one?In case that only API is available, when you recommend to check the subscription, each 24h, when the user log in?

Thank you!

No sound when receiving push notification

$
0
0

i am using react-native-firebase v6 to handle the push notification. The problem is there is no sound played when the push notification received.

I have create a channel and set it to high priority since the default channel created by react-native-firebase has no sound. Here the code i used in the MainActivity.java

protected void onCreate(Bundle savedInstanceState) {  super.onCreate(savedInstanceState);  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {        NotificationChannel notificationChannel = new NotificationChannel("notifid", "App notification channel", NotificationManager.IMPORTANCE_HIGH);    notificationChannel.setShowBadge(true);    notificationChannel.setDescription("custom notification channel");    notificationChannel.enableVibration(true);    notificationChannel.enableLights(true);    notificationChannel.setVibrationPattern(new long[]{400, 200, 400});    //notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);    NotificationManager manager = getSystemService(NotificationManager.class);    manager.createNotificationChannel(notificationChannel);  }}

And here is the code to change the channel in firebase.json

{"react-native": {"messaging_android_notification_channel_id": "notifid"  }}

But the sound still not playing when the notification received.

Automatic SMS Verification in Chrome Custom Tabs

$
0
0

We have a native Android app, but our Login and Signup are done in Chrome Custom Tabs via mobile number and One Time Password.

Is there a way to read the One Time Password from the SMS and prefill it on the webpage for the user as we do in Native Apps.

tif and tiff images are not displaying android with Image component of react native

$
0
0

All images types are working even gif also but tif and tiff images are not getting displayed in android with Image component of react native.

For gif I used fresco:animated-gif but is there any other way for tif and tiff.I used only Image in render and also tif is my local image.

React Native : BLE, Discover & Broadcast (advertise data)

$
0
0

I'm very new to BLE APIs and capabilities. I want to achieve a "simple" thing. Let's say I'm developing the APP-X. I want to be able to scan other phone around me, with APP-X installed (exactly like this app here https://www.tracetogether.gov.sg/ ). I want to scan and filter the wanted devices via a "simple" metadata (advertising data ? specific for my app) within the signal emitted by the concerned phones. I'm stuck because Idk how to "emit" (broadcast) that custom signal.

Can you please help me find a way to do this in RN ?

I have already check those libs:

Many thanks

Cannot install turtle-cli with npm install -g

$
0
0

I develop an app with expo and because of react-native-sound module I need to build an apk for test my program, but I must build in local, so I tried to install turtle-cli but I have many error and I don't know-how to fix it.

expo diagnostics return:

  Expo CLI 3.17.18 environment info:    System:      OS: Linux 5.5 Fedora 30 (Workstation Edition) 30 (Workstation Edition)      Shell: 5.7.1 - /usr/bin/zsh    Binaries:      Node: 10.19.0 - /usr/bin/node      npm: 6.14.4 - /usr/local/bin/npm    npmPackages:      expo: ~37.0.3 => 37.0.6       react: ~16.9.0 => 16.9.0       react-native: ^0.62.2 => 0.62.2     npmGlobalPackages:      expo-cli: 3.17.18

First I tried without sudo:

...npm ERR! code EACCESnpm ERR! syscall accessnpm ERR! path /usr/local/lib/node_modulesnpm ERR! errno -13npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']npm ERR!   stack:npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',npm ERR!   errno: -13,npm ERR!   code: 'EACCES',npm ERR!   syscall: 'access',npm ERR!   path: '/usr/local/lib/node_modules' }npm ERR! npm ERR! The operation was rejected by your operating system.npm ERR! It is likely you do not have the permissions to access this file as the current usernpm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try runningnpm ERR! the command again as root/Administrator.npm ERR! A complete log of this run can be found in:npm ERR!     /home/Osmonoz/.npm/_logs/2020-04-09T10_00_56_580Z-debug.log

And there is the sudo npm install -g turtle-cli errors:

...> dtrace-provider@0.8.8 install /usr/local/lib/node_modules/turtle-cli/node_modules/dtrace-provider> node-gyp rebuild || node suppress-error.jsgyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/10.19.0"gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/turtle-cli/node_modules/dtrace-provider/.node-gyp"gyp WARN install got an error, rolling back installgyp WARN install got an error, rolling back installgyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/turtle-cli/node_modules/dtrace-provider/.node-gyp'gyp ERR! System Linux 5.5.10-100.fc30.x86_64gyp ERR! command "/usr/bin/node""/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js""rebuild"gyp ERR! cwd /usr/local/lib/node_modules/turtle-cli/node_modules/dtrace-providergyp ERR! node -v v10.19.0gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok > iltorb@2.4.5 install /usr/local/lib/node_modules/turtle-cli/node_modules/iltorb> node ./scripts/install.js || node-gyp rebuildWARN install EACCES: permission denied, access '/root/.npm'gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/10.19.0"gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/turtle-cli/node_modules/iltorb/.node-gyp"gyp WARN install got an error, rolling back installgyp WARN install got an error, rolling back installgyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/turtle-cli/node_modules/iltorb/.node-gyp'gyp ERR! System Linux 5.5.10-100.fc30.x86_64gyp ERR! command "/usr/bin/node""/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js""rebuild"gyp ERR! cwd /usr/local/lib/node_modules/turtle-cli/node_modules/iltorbgyp ERR! node -v v10.19.0gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok > sharp@0.24.1 install /usr/local/lib/node_modules/turtle-cli/node_modules/sharp> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)ERR! sharp EACCES: permission denied, mkdir '/root/.npm'info sharp Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flaginfo sharp Attempting to build from source via node-gyp but this may fail due to the above errorinfo sharp Please see https://sharp.pixelplumbing.com/install for required dependenciesgyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/10.19.0"gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/turtle-cli/node_modules/sharp/.node-gyp"gyp WARN install got an error, rolling back installgyp WARN install got an error, rolling back installgyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/turtle-cli/node_modules/sharp/.node-gyp'gyp ERR! System Linux 5.5.10-100.fc30.x86_64gyp ERR! command "/usr/bin/node""/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js""rebuild"gyp ERR! cwd /usr/local/lib/node_modules/turtle-cli/node_modules/sharpgyp ERR! node -v v10.19.0gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok...npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! sharp@0.24.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the sharp@0.24.1 install script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR!     /root/.npm/_logs/2020-04-09T09_48_07_424Z-debug.log

I hope someone know what I'm doing wrong,

thanks

How to call ASP.NET MVC Web API from React Native Mobile App using localhost

$
0
0

I built WEB Api with ASP.NET MVC. I can access the API with fetch from JavaScript in my browser. But when I try to access the API from React Native App, I get a warning: "Possible Unhandled Promise Rejection (id: 2):......."

I do understand the warning since nothing is showing up on the screen, but I do wonder how would anyone call Web api on localhost from react native app.

I am running my react native app with "expo start --localhost --android" and it is showing up on my android phone connected with USB to my mashine.

App.Js

import React from "react";import { StyleSheet, Text, View, FlatList } from "react-native";import Constants from "expo-constants";import Row from "./Row";export default class App extends React.Component {  state = {    movies: null,    isLoading: true  };  componentDidMount() {    return fetch("https://localhost:44343/api/movies")      .then(response => {        return response.json();      })      .then(data => {        this.setState({          movies: data,          isLoading: false        });      })      .catch(err => {        this.setState({ movies: [...this.state.movies, err] });      });  }  render() {    if (this.state.isLoading) {      return (<View style={styles.container}><Text>Loading...</Text></View>      );    } else {      return (<View style={styles.container}><Text style={styles.text}>-MOVIES-</Text><FlatList            data={this.state.movies}            renderItem={({ item }) => <Row movies={item} />}          /></View>      );    }  }}const styles = StyleSheet.create({  container: {    flex: 1,    backgroundColor: "#fff",    alignItems: "center",    justifyContent: "center",    paddingTop: Constants.statusBarHeight  },  text: {    fontSize: 40  }});

if you look at componentDidMount() i tried to call fetch("https://localhost:44343/api/movies"), but it is not working, but when i run my app on Web, it is working just fine.

Does anyone have a clue how to fix this, so I can call api directly from react native?


How to safely run a react-native project in iOS that is working perfectly in android?

$
0
0

I am building a react-native project to track Covid19 cases, it is simple and minimal, which is my first project and I only intend to get data that I want to view.

I have been building it in Windows and I have even generated .apk file which works pretty fine and I have let some of my friends tested it.

Unfortunately, I use iOS and I want to use it for myself. I do own a mac, so I pushed the original file to the github and cloned it in my mac. I have run npm install and pod install, but it just isn't working fine. I have tried two things.

I have tried to run it in the traditional way, running it in the iOS emulator with npx react-native run-ios.

And I have also tried to deploy it into my iPhone by following an article from medium. But it seems like I am doing something not possible. Is it possible to use the same code base and structure for both ios and android? Or what did I miss when I cloned it from the github? I do know many files are being .gitignore'ed.

I am getting error when building React Native application in debugmode

$
0
0

I am trying performance testing for my react native Application. My QA Team has given me guidelines to follow as where the code should be added in order to allow load testing and record script from app to BlazeMeter. Following all steps from BlazeMeter guidelines and then setting debug mode to true, Application crashes when qa team opens app.

Guidelines I followed are here:https://guide.blazemeter.com/hc/en-us/articles/360000271458-Creating-the-Proxy-Recorder-Creating-the-Proxy-Recorder

I am getting below error when on building the app when debug mode set to true:

Process: com.sprucekids, PID: 8854    java.lang.RuntimeException: com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 123     detail: View tag:125      children(0): [     ],      viewsToAdd(1): [    [0,123],     ],        at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:344)        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:30)        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:174)        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)        at android.view.Choreographer.doCallbacks(Choreographer.java:761)        at android.view.Choreographer.doFrame(Choreographer.java:693)        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)        at android.os.Handler.handleCallback(Handler.java:873)        at android.os.Handler.dispatchMessage(Handler.java:99)        at android.os.Looper.loop(Looper.java:193)        at android.app.ActivityThread.main(ActivityThread.java:6669)        at java.lang.reflect.Method.invoke(Native Method)        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)     Caused by: com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 123     detail: View tag:125      children(0): [     ],      viewsToAdd(1): [    [0,123],     ],        at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:508)        at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:205)        at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:779)        at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:888)        at com.facebook.react.uimanager.UIViewOperationQueue.access$2200(UIViewOperationQueue.java:42)        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:948)

Provide help for above query. Thanking you in advance

error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`. in windows 10

$
0
0

Hi I am very new and fresh to react native, I have followed docs installed all needed tools to run react-native with android studio.

Here is my sdk platform settings

enter image description here

Here is my sdk tools settingsenter image description here

I can launch the virtual device manually its shows up and working normally,

But When I run react-native run-android I get the following error

PS C:\custom-xammp\htdocs\shoppingList> react-native run-androidinfo Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 963 file(s) to forward-jetify. Using 8 workers...info JS server already running.'adb' is not recognized as an internal or external command,operable program or batch file.info Launching emulator...error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.info Installing the app...ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.Please set the JAVA_HOME variable in your environment to match thelocation of your Java installation.    error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081        at makeError (C:\custom-xammp\htdocs\shoppingList\node_modules\execa\index.js:174:9)        at Promise.all.then.arr (C:\custom-xammp\htdocs\shoppingList\node_modules\execa\index.js:278:16)        at process._tickCallback (internal/process/next_tick.js:68:7)    PS C:\custom-xammp\htdocs\shoppingList> 

what do I need to do to solve this problem?

Yarn android doesn't york

$
0
0

Hello i tried to do yarn android to build my react-native project but it doesn't york...

yarn run v1.22.0$ react-native run-androidinfo Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 1044 file(s) to forward-jetify. Using 12 workers...info JS server already running.'adb' n'est pas reconnu en tant que commande interneou externe, un programme ex�cutable ou un fichier de commandes.info Launching emulator...error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.info Installing the app...

FAILURE: Build failed with an exception.

  • What went wrong:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • 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 757ms

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • 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 757ms

at makeError (C:\devs\2sport\2sport-mobile\node_modules\execa\index.js:174:9)at C:\devs\2sport\2sport-mobile\node_modules\execa\index.js:278:16at processTicksAndRejections (internal/process/task_queues.js:97:5)at async runOnAllDevices (C:\devs\2sport\2sport-mobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)at async Command.handleAction (C:\devs\2sport\2sport-mobile\node_modules\@react-native-community\cli\build\index.js:186:9)

error Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

That my entire Log can u help me?

(sorry for my english)....

android bundle won't load but apk will

$
0
0

I'm in the process of working on a React Native app that I took over the code base for. For some reason the build I pushed to the play store beta hangs at the splash screen, but the same apk works fine when installed (instead of the aab). I don't see anything in the android studio logcat that would indicate the source of the issue.

Not able to run React-Native app through Emulator

$
0
0

C:\Projects\albums>npx react-native run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.

info Starting JS server...* daemon not running; starting now at tcp:5037* daemon started successfully
error Failed to launch emulator. Reason: Emulator exited before boot..warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.info Installing the app...Error occurred during initialization of VMFailed setting boot class path.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081    at makeError (C:\Projects\albums\node_modules\execa\index.js:174:9)    at C:\Projects\albums\node_modules\execa\index.js:278:16    at processTicksAndRejections (internal/process/task_queues.js:97:5)    at async runOnAllDevices (C:\Projects\albums\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)    at async Command.handleAction (C:\Projects\albums\node_modules\@react-native-community\cli\build\index.js:186:9)

This is what the error I'm getting while running my app.Can you please help me with it.

Permission always returns never_ask_again

$
0
0

Steps to replicate:

react-native init project<add code below to the project(App.js component)>react-native run-android

I called the function in onPress of a text component.

The permission request always returns never_ask_again even for the fresh app run.

async requestPermissions() {// android 6.0 +if (Platform.OS === 'android'&& Platform.Version >= 23) {  try {    const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, {'title': 'Let the access location','message': 'locate you.'    });    console.log('granted: ', granted);    if (granted === PermissionsAndroid.RESULTS.GRANTED) {      Alert.alert("Granted access", [{ text: "ok" }])    } else {      Alert.alert("can't access to GPS title","returned "+ granted,        [          { text: "ok" }        ]      );    }  } catch (err) {  }}}

Even when the permissions is enabled from settings, still the never_ask_again is returned.

React Native Version: 0.55.2React Version: 16.3.1

in app/build.gradle

targetSdkVersion 23

Thanks


Project with path ':unimodules-core' could not be found in project ':@unimodules_react-native-adapter'

$
0
0

Taking over RN project from another developer and trying to make a build for Android, however Gradle keeps giving me this issue:

ERROR: Project with path ':unimodules-core' could not be found in project ':@unimodules_react-native-adapter'.

The only solution I could find regarding this is adding settings.gradle file:

include ':@unimodules_react-native-adapter'project(':@unimodules_react-native-adapter').projectDir = new File(rootProject.projectDir, '../node_modules/@unimodules/react-native-adapter/android')

but this doesn't work for me.

I have linked the native dependeciesI have tried npm and yarn

Project is using:

"@unimodules/core": "^3.0.2","@unimodules/react-native-adapter": "^3.0.0",

Gradle is directing me to the @unimodules/react-native-adapter/android/build.gradle file:

apply from: project(":unimodules-core").file("../unimodules-core.gradle")

Any guidance of what could possible be wrong, would greatly be appreciated

Check service of subscription status in app purchase Android

$
0
0

I'm developing an application with react native that will work with in app purchase payments for subscriptions. I tried to find how to manage the subscriptions in both platforms, and I found that Apple notify status changes to your server.

My problem appears with Android, I only found an API to make requests. There is some service from Android like the Apple's service? In case that only API is available, when do you recommend to check the subscription, each 24h, when the user log in?

Thank you!

What are my options for storing data when using React Native? (iOS and Android) [closed]

$
0
0

I am still new in the React Native world, and generally in the mobile/native world as well, and I am finding the documentation a bit lacking when it comes to data persistence.

What are my options for storing data in React Native and the implications of each type? For instance, I see that there is local storage and async storage, but then I also see things like Realm, and I'm confused how all of this would work with an outside database.

I specifically want to know:

  • What are the different options for data persistence?
  • For each, what are the limits of that persistence (i.e., when is the data no longer available)? For example: when closing the application, restarting the phone, etc.
  • For each, are there differences (other than general setup) between implementing in iOS vs Android?
  • How do the options compare for accessing data offline? (or how is offline access typically handled?)
  • Are there any other considerations I should keep in mind?

Thanks for your help!

React Native Android Fetch failing on connection to local API

$
0
0

I'm using the fetch API in my react-native Android app to make requests to a local API. I usually query said API from react web apps at http://localhost:8163.

I'm testing my app on my physical device in debugger mode. I read somewhere that react-native can't query localhost the same way a web app can. Apparently you have to use http://10.0.2.2:[PORT_NUMBER_HERE]/ which is an alias for `http://127.0.0.1:[PORT_NUMBER_HERE] according to the the Android emulator docks. I'm not sure if this is what I'm supposed to be doing for testing on a physical device.

My fetch code looks like the following:

fetchToken() {    fetch('http://10.0.2.2:8163/extension/auth', {        method: 'GET',        headers: {'Accept': 'application/json','Content-type': 'application/json'        }    })    .then((response)) => console.log('successful fetchToken response: ', response.json()))    .catch((error) => console.log('fetchToken error: ', error))    .done();}

The request always hangs for a while and then reaches the catch block with the unhelpful error TypeError: Network request failed(...). Checking the logs for my local API, they don't register the request at all.

So I have no idea if I'm querying my local API correctly to get the resource that I want, and if I am, I don't know why the fetch is failing.

Execution failed for task ':app:installRelease' react-native

$
0
0

I wanted to create an android apk file in react-native. I followed the instructions as per the link below

https://reactnative.dev/docs/signed-apk-android

  1. Generated upload key
  2. Added gradle variables
  3. Added signing config

this worked well but for below command I am getting an error

npx react-native run-android --variant=release

Error:

Task :app:installRelease FAILED

FAILURE: Build failed with an exception.

  • What went wrong:Execution failed for task ':app:installRelease'.

    com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package io.nativebase.market.geekyants.straptaxiapp signatures do not match previously installed version; ignoring!

  • 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 20s65 actionable tasks: 2 executed, 63 up-to-dateerror 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 haveset up your Android development environment:https://facebook.github.io/react-native/docs/getting-started.htmlerror Command failed: ./gradlew app:installRelease. Run CLI with --verbose flag for more details.strong text

Please help..!

Viewing all 28476 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>