React Native + Android: Release build "Unfortunately App, has stopped" - android

I am trying to prepare my app for release.
When I run the app from android studio it works fine. But when I upload a beta build to the Play Store or I run adb install android/app/app-release.apk and try to run the app on my phone, it shows the Unfortunately App, has stopped message.
How can I debug this? Is there a way to run the release build on my phone through android studio so that I can view the logs?

I have never tried, but leave your device plugged in to USB. Run adb logcat in the terminal.
There's probably additional settings to filter for your specific application package

Related

Share flutter app as APK which works on real devices

I want to build APK from the flutter project and share it to someone to review. I followed the docs, but the problem is when he tries to open the APK he gets
"there was a problem parsing the package"
I tried it on another device and gets
"App not installed"
I think the problem is in the APK file, So how I can build a correct APK that works on real devices?
I keep the name of the file "app.apk" does that matter?
from the Flutter docs, to build an APK from the command line:
Run flutter build apk
(The flutter build command defaults to --release.)
This command results in an APK file:
[project]/build/app/outputs/flutter-apk/app-release.apk
take note of the path and ask name(app-release.apk)
if you would like to debug why the apk not running on physical device, install this app https://fbflipper.com/ on your system, and connect your mobile device though a usb cable, now when you run the apk, on the flipper app you will receive crash report that will help you understand why your app is crashing!

How to see debug console when app installed through apk in flutter?

I am able to see debug console in the terminal when I am run the command flutter run
but when I run the command flutter build apk --split-per-abi
it's given me two application
so when I am installing one of this apk in my android phone, I am not able to see any debug output or my print.
I want to know how can I do this because my app is working fine in debug mode but when I installed flutter build apk --split-per-abi this apk, my app crash after two or three pages because of an external plugin.
How can I check debug console when I am installed the app through apk?
flutter attach
and then start your application. Or using adb logcat:
adb logcat *:S flutter:V

How to upload android react-native app to hockeyapp

How do I build the react-native app so I can test it in hockeyapp without being connected?
I'm using react-native-hockeyapp and successfully built the app, which listed it on hockeyapp, but now with the hockeyapp changes:
It does not run on a connected device with run-android and I get a white screen and no console debug messages anymore.
When I uploaded the app_Debug.apk to the hockeyapp by dragging it on the website, I got an invite. Run it on my device and get the white screen and the following two errors:
a. unable to load script from assets 'index.android.bundle'. Make sure your bundle is pakcaged correctly...
It then shows a white screen.
b. If I shake and press reload it says: could not connect ot development server. I don't want to connect to development server. I want to test it disconnected!
How do I build the app? In Android Studio? Any pointer to instructions?
And how do I preserve the possibility to react-native run-android so that I can test it locally and debug quickly for development?
I created a keystore and then went to myproject/android folder and gradlew assembleRelease
See https://github.com/benloopcompany/react-native-hockeyapp/issues/84 for more details

How can I fix Android app launch stopped error?

I have installed my android app in my device. But getting "Unfortunately, app has stopped."
How can I debug the installed app? Is it possible to debug the app directly installed in the device?
Since code is not available with me
You can't connect debugger to an application if it uses a release build type where all of the information necessary for debugging is stripped out
(true for apps from play market).
If you don't want to use a debugger but just to see logs you may see log in android studio or just by running adb logcat in terminal.
Android Studio 3.0 also has a feature of Profile and Debug Pre-built APKs but only if they were built with debugging enabled

App is crashing while clicking on app icon

I installed the app through android studio and its working fine, but when I create the apk and then I installed the apk, on some devices my app is crashing.
Can someone know how we can see the logs or errors in case when we installed through apk, in can't debug the app bcos its working that time.
here are few details,
build variant: debug,
my apk name: app-debug.apk,
and I am using 2 3rd party libs as an .aar files
If you have installed the apk also you can able to get the logs if you have connected your device with studio. For that you have set the No Filter in Android Monitor.
In the phones, your app is crashing, don't just install the app by apk there. May be some of your 3rd party dependency is not compatible with those versions or phones.
Debug your app in those phone with cable and check error logs. You will get to know the problem

Categories

Resources