I tried to build my react native app and got the error below.
it works totally fine in debug build while app crashes in release build.
I got this by logging my android device with the command adb logcat '*:E'
Thanks in advance.
Related
I am new to react-native or you can say new to React and I am working on react-native navigation I have installed all the required libraries as instructed in https://reactnavigation.org/docs/getting-started but when I am running my code it is giving an error as '#react-navigation/native could not be found within the project or in this directories.' What should I do is there any way to get started with my code? Help me
If you have installed your app following the react native cli guide you might want to try running
gradle clean
in your android folder und then try to run your app in the emulator again.
On my first steps with react native I stumpled upon the same issue. :-)
I have an issue with react native release APK.
The app run on debug mode but it crash immediately on release mode
Is that app running without any warnings/errors before building the APK?
The error message clearly says that it can't find a variable, maybe it got deleted or modified.
You can cross-check the app once by going to the development mode and see if you get the same error.
Try out clean your gradle and make the apk again.
I am using expo for my react native application.
Steps:
- run expo start
Hit the error below on android studio emulator.
Working fine on real android device and IOS simulator.
UPDATE:
I have solved the issue. The issue was with my android studio. I open the app using the genymotion emulator and it was working
Unfortunately, Branch does not officially have a wrapper SDK for Expo and the link you referenced is built by a third-party which we cannot help troubleshoot.
Can you try ejecting your build from Expo and use native packages and linking in React Native, by following this: https://docs.branch.io/apps/react-native/#integrate-branch
Running react native app on the android simulator.
Installed react-native-maps module and build again. The app stopped working.
Build successful but the app crashes as soon as I open it without any error or exception.
google-services version 4.0.1
React native - latest
I tried adding disablestrictVersioncheck to true in the build.gradle file. Did not help.
I'm starting with react-native and I'm getting this problem: I can't log to bundler metro server.
If I create my application using create-react-native-app, I can do 'console.log' and value are logged to metro bundler (running on port 8081).
But if I create my application with react-native init <project>, this doesn't work. To make console.log work, I need to open Chrome DevTools and set remote debug in application.
So my question is: is there any way to make native code to log in bundler console with console.log? I don't want to work with 'create-react-native-app' because it uses Expo and 'realm' database doesn't support expo.
I've tried with react-native 0.55.4 and 0.56, both in windows and linux.
You can also see the console.log() outputs using these commands:
$ react-native log-android
$ react-native log-ios
Note: It also works to debug native errors, for example when you have a blank screen and metro bundler doesn't show errors neither.
For more information you can check this out
Don't know if I correctly understand your question (because of my english), but you can try this:
Run adb logcat *:S ReactNative:V ReactNativeJS:V in a terminal to see
your Android app's logs.
Taken from Using adb logcat for React Native Debugging
You can download React Native Debugger and Open your JS Debugger in development menu. You can see everything into RN Debugger.
I discovered that console.log are omitted from console log if your disable remote debug from the debug menu
On Mac. While on ios simulator Clicked on
Command-d->Stop Debugging
.This made logging work for me.