Android logcat not showing error - java

I have a little problem, I used to be able to see everything in the logcat (I am using Android Studio), in particular when a Java error occured (e.g. NullPointerException) I could see it quite precisely in the logcat. However since a while, I can see my System.out.print, and my Log (i.e. Log.i, Log.d etc) for instance but not the errors...
Hence my app crashes and I have absolutely no clue why.
Anyone having the same issue?
Best,
Alex

Related

What is causing an error showed in the Google Play Console pre-launch report?

I launched my app in the alpha channel, and my Google Play Console pre-launch report details page shows an error occurred on Android 12 (SDK 31).
The stack trace that show me is:
ANR in com.google.android.apps.safetyhub;PID: 11778;Broadcast of Intent { act=com.google.android.gms.phenotype.UPDATE flg=0x30 pkg=com.google.android.apps.safetyhub cmp=com.google.android.apps.safetyhub/com.google.apps.tiktok.experiments.phenotype.ConfigurationUpdatedReceiver_Receiver (has extras) };
I don't see the name of my package anywhere.
Can you help me to understand what is causing the error?
If you are not using those packages of the ANR it is warning you about, it is likely a bug in the Google Play Console testing platform and/or simulated device. This is especially the case an error only appears on one device. It tests on numerous different emulated devices, so if it's just happening on one, it's probably just a one-off glitch that's unrelated. Good news is you don't need to pass the pre-launch report in order to release, so you can ignore it!
In any case, you should double check the full logcat. Click 'show more' then click the -> to the right of the device, then click download full log cat. If it doesn't seem like your app initiated any calls, it's probably just a background crash that is unrelated to your app and you can disregard it.

"E/android.hardware.audio#6.0-impl.ranchu: WriteThread::doWriteImpl:226: pcm_write failed with Operation not permitted" in Android Studio [duplicate]

I'm new to Android Studio, using latest version, and trying to code a basic calculator app.
For some reason, my logcat is full of
2021-01-11 14:38:35.288 6938-6938/? W/cmd: Can't find service car_service
This is really annoying for debugging.
How can I get rid of it ?
I'll change my comment to an answer, seeing as though it actually helped:
click on logcat at the bottom of android studio, then (i'm assuming) yours will show no filters, change that dropdown to show only selected application. Not really much I can explain here, except for the fact that if you don't have it setup like this, logcat will print out things which are irrelevant to your app in addition to the logs from your own application
Additionally, to all future readers... Android Logcat is quite verbose, especially on Emulators (where a lot of things throw errors/warnings) but not limited to; Samsung devices spit more log than useful information (And they are not alone), so a way to keep it under some control, is to (ab)use the Regex feature of the logcat filter in Android Studio.
E.g.:
Create a new LogCat Filter and filter by Tag, Message, or Package (or all 3 like I do):
This is an example I use in "Message":
^((?!EGL_emulation|eglCodecCommon|OpenGLRenderer|MicroDetectionWorker|MicroDetector|KeyguardClockSwitch|adbd|OIMC|base.apk|wakelock|com.google.android.apps.youtube.music).)*$
You can edit/add more to these and/or repeat it for LogTag, Message, or Package Name.
It's mostly trial and error. (some devices spit different spam via logcat).
My Log Tag filter for this "very filtered app" output is:
^((?!vendor.qti.bluetooth|AppDynamics|KeyguardUpdateMonitor|BatteryExternalStatsWorker|BatteryStatsService|tftp_server|Clock|libc|OnePlusSmartBoostManager|OnePlus|ANDR-RAMBOOST_SERVER|BoundBrokerSvc|DateView|BatteryStatsHelper|BoundBrokerSvc|RenderThread|FacsCacheGmsModule|DownloadProgressMonitor|MendelPackageState|GoogleTagManager|SELinux|Volley|ConfigFileUtils|NetRec|YouTubeMusic|GEL_DELAYED_EVENT_DEBUG|gms|AsyncOperation|angh|ContentCacheSuperpacksManager|SuperpacksManager|AwarenessClientProvider|WakeLock|GLSUser|perfetto|cmd|chatty|Binder|Fitness|Icing|GnssHAL_GnssInterface).)*$
and for Package Name:
^((?!EGL_emulation|eglCodecCommon|OpenGLRenderer|MicroDetectionWorker|MicroDetector|KeyguardClockSwitch|adbd|OIMC|base.apk|wakelock|com.google.android.apps.youtube.music).)*$
Of course your mileage will vary in what you need, and sometimes I edit these and add/remove some parts as I see fit.
This is how it looks:

Android Studio Shows error in everything suddenly

See Images.Check Error Here!
I dont know what happened but every thing shows in error. while restarting sometimes it says something like "can not load settings from file android studio". As you can see my, java code turned in to XML code. I am new in Android studio so please someone help me. I cant even go back to my previous version since i forget commit last 24 hour work. Any suggestion and help will be highly appreciated. Thanks

Android app resume bug issue

This is not really a programming question but more of a debuging question.
I have an app that works fine, however, it is a bit unreliable when we try to resume the app.
What happens is, if we background/ minimize it, and than try to resume the app by clicking the app's icon. It sometimes crashes and it sometimes doesn't. It is unreliable that we can not trace what is the issue and why it occurs.
Any possible solution or places we can start tracing for the issue, please advise me :)
Cheers
Not a programming question but it is a development question. It is extremely inconsistent didn't know how to even find the stack-trace
How I solved it was wrapped everything with a bunch of try catch and print the error stacktrace to the screen(or email the developer), finally found out the error was with one of the 3rd party LocationService library I was using.
Note: Location Service is not very reliable, please be caution in how you want to use that feature Android Devs!

ComponentInfo GridLayout error only in emulator

I made an Android App and on every hardware device I tested it, it runs. This goes from 2.1.x to 4.2. But now I wanted to make sure, that it looks good on every screen size, so I tried the app in different emulators.
No single emulator configuration could run this app and I cant understand why. I always get this error
java.lang.RuntimeException: Unable to start activity ComponentInfo{*class*}: android.view.InflateException: Binary XML file line #325: Error inflating class android.widget.GridLayout
I think most of the error code is uneccessary to post, but there are 5 lines like this
E/AndroidRuntime(425): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
I would understand an app that runs only in emulators (I once had this problem until I went to usb debugging with "real" devices), but an app that only gets along with real devices seems a bit weird to me. Someone has an idea?
EDIT
Lots of people have this error because of RAM problems, but my app uses not more than 5 MB

Categories

Resources