How to fix the issue if app is crashed in android? - android

I have developed and put an android application in Google Play store.
Someone inform me that the app is crashing while doing something in application.
As a application developer,
How to find the problem and fix it in android?
Is there any tool or framework to debug the crashed app in android?

There are many sdks out there which can be incorporated in your app.
You can use
1. crashlytics
2. localytics
3. crittercism
Its always a best practice to include some analytics tools in your android application to know where users are spending a lot of their time. I personally like flurry Analytics.
Since you have already uploaded the apk you should check it out in the google play developer console. Even google will provide the crash data, and it is the only resource you have.
As far as fixing the application goes you can do it only by uploading a new apk and asking the users to update the app.

ACRA is a right choice for you to analyze the crash report. Please refer the following link to implement in your project.
https://github.com/ACRA/acra
And also, You can find the crash report in your developer console if the the user has sent the crash report while force closing of the application.
Please ensure that you have not enabled the proguard. if you have enabled proguard, try decode the lines using the following link
http://developer.android.com/tools/help/proguard.html#decoding

Related

android (flutter) - App downloaded from Google Play Store crashing after Splash screen in Android 12, but working fine locally even in release build

We have had our app published to Play Store for a very long time. but recently we got this issue in Android 12.
Image showing Google Play Console
There are two types of APK in Play Console
Original File
Distribution APK
this problem is happening in the distribution app
I checked the logcat with adb but it's only showing WINDEATH and there is no other crash
I have checked all over Google and StackOverflow but there is no such question asked that I came across
After opening the app it's showing it like this
App Crash Screenshot
Also, we are using Firebase but there is nothing captured related to this
Use a crash reporting service such as Firebase
or Sentry.io.
These will help you log the crash, get some data about when it happened, why it happened etc. Flutter apps are not meant to crash, so check out your interactions with 3rd party plugins that are initiated on app start. Also, check your signing keys, maybe there is a mismatch between the debug ones and the production ones.
Good luck!

"Debugging" an android app after it has been deployed to the store

I have deployed an Android app (that utilises maps) on the Google Play Store and all my friends who have got it say it works fine, except for one user, who is on a Samsung S9 running Android 9. He says that the app crashes as soon as the launcher icon is pressed. I'm at a loss as to how to proceed since the app works fine on my machine and on everyone elses, as far as I can determine. How can I proceed? Is there a way to run the app on his machine to generate a trace or some logs to determine when/how the crash occurs?
I used to use Fabric, It's free and doing awesome job. now Fabric joined forces with Firebase with the goal of giving developers one place to build and grow their apps. Now that we've brought over the Fabric tools you know and love to Firebase, Fabric will deprecating on March 31, 2020 and terminating all Fabric service agreements at that time. so you can check Firebase too.
And also from your Google Play Console -> Select you app -> Android Vitals -> ARNs & craches and here you can also find some useful informations about craches (The activity and the line number)
I use firebase crashlytics. Crashlytics creates a full report about any bug that your app suffers. It is very easy to implement and very useful.
An alternative to Crashlytics is ACRA. It's still actively maintained and you can host the stack by yourself or use one of the provided solutions.

What to do when app keeps crashing and reports IllegalStateException with unknown source?

Recently I updated my app by adding a couple of functions. In addition, I recreated the project since I had problems with app support for Android devices below Lollipop. After update and upload on Google Play, I update the app over Google Play on my separate real device (non test device) and it just keeps crashing (by opening it closes right away) without any errors on device. Google Play Console reports under "Crashes" IllegalStateException at
package.d.a (Unknown Source:73). However, the d.a package name is totally unknown for me, because I do not have that in my entire project.
package.MainActivity.onResume (Unknown Source:8). At this 8th I have an Import which would never cause an exception.
I guess that not only me, but some another users, who already updated the app, have also the save problem. However, I just generated a signed apk of my app and installed it on my real device (non test device), but for this step I needed to remove the app downloaded from Google Play before manual installing. This approach worked and the app does not crashes any more and works properly without problems.
I think, for users who download the app for the first time ever, this problem does not occur for them. How can I find out the cause of the problem?
Here is my app. If the app works for those who downloaded it after reading this post, please send me some short feedback using the built in Send Feedback in the app just to ensure the app functionality.
If you use proguard you need to add the mapping file to your console
If you use ProGuard to optimize and obfuscate your APK files, you can upload a ProGuard mapping file for each version of your app on the Play Console to deobfuscate your crash stack traces and help you better analyze your app's crashes.
Important: Only ProGuard mapping files are supported for deobfuscation.
Do you use any kind of testing with your app? You can try testing it on Firebase Test Lab, especially the Robo Tests, which try to crawl and use all app interactions.
They can help in detecting any faults or issues early on before releasing the app to the market.
You can also use Firebase's Crashlytics to detect crashes and get more details on the crashes.
Hope this helps.
I found the solution. In my case, I just needed to clear the cash of the app in the device settings. It helped to run the app again. However, there could be another solutions or even problems with such kind of app crash.

log stacktrace from another user with error: Unfortunately, Application has stopped

This is an information question rather than a technical question. I have an app in Google Market. I need to know stracktrace of errors happens in other phones.
I have investigated but I have not seen anything about it. Does anyone know if Google offers some service to look at the errors that your application is giving in the market and thus to be able to reproduce it?
Thanks in advance!
Well google offers one really powerful tool "Firebase" it provides great analytics and crash reporting. In addition to analytics and crashes it provides others utilities like Cloud-Testing, Push Notifications and many others.
Other popular solution is Crashlytics offered by twitter.
Open your app at the developer console and select "disruptions and ANR". Here you can select on of disruptions you have, then you can see error stack trace!
Or you can use appmetrica from yandex. Link to yandex.metrica It's very simple to integrate yandex.metrica to your app and get all data about crashes and statistic (country, city, android version and so on).
Link to console

Android: logging of published application

My application is going to be published in the market. I want to know if is there any standard lib or procedure we can follow for collecting logs of published apps.It should not only collect the crash logs but also have to log apps critical events and send to a predefined backend server. And my source code is obsucated using proguard.
Please suggest an efficient way if anyone has done it.
If you're after free and open source check out the following lib: ACRA.
What is ACRA?
ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form(now deprecated, but they instead use Acralyzer, which is much better). It is targetted to android applications developers to help them get data from their applications when they crash or behave erroneously.
Here you can find their GitHub page which lists all the features of ACRA if you want to decide if this is for you.
I want to know if is there any standard lib or procedure we can follow for collecting
logs of published apps.It should not only collect the crash logs but also have to log apps
critical events and send to a predefined backend server.
There is an open Source Library called Apache log4j. So by using this Api you can store the all kind of Log into a Text or .Xml file and will be stored in your given path.
You can find the document Log4j
You can download jar from Here
And if you released your application then you can get the Crash log on Google Play Developer Console.
Or else you can use Android Crash report using ACRA to get the Crash log in terms of Excel
Hope this will help you.
You can use Hockey App for retrieving crash reports from users. You can use this link also

Categories

Resources