logcat

Enable LogCat on Release Build in Android Studio

倾然丶 夕夏残阳落幕 提交于 2019-11-28 19:33:05
问题 By default, when I change Build Variants to release I don't get any Logs on the logcat, but I do need to read release logs of my app, how can I enable this? 回答1: Add android:debuggable="true" (default is false) to your Manifest inside the <application> tag. From the docs: android:debuggable Whether or not the application can be debugged, even when running on a device in user mode — "true" if it can be, and "false" if not. respectively You can disable debugging by removing the android

AbsListView unregisterIRListener() is called

社会主义新天地 提交于 2019-11-28 19:08:45
I'm doing some debugging on an app that I'm working on, and in my LogCat, I continue to get a message with tag "AbsListView" and message "unregisterIRListner() is called." Is there something I'm NOT doing within my code that would cause this? Is it even something that I need to worry about? I'd rather not post the (over) 550 lines of code I have for this. Any information would be useful. Thanks. Looks like Google developers left debug call uncommented in source code. To avoid this unusable LogCat output I'm using following filter: tag:^(?!(dalvikvm|AbsListView)) This filter cut out all taged:

onCreateView method gets called when? and How many times in Activity life cycle?

ぐ巨炮叔叔 提交于 2019-11-28 18:17:20
I wrote a little program looking like this: package com.example.lifecycle; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; public class LifeLogger extends Activity { private String TAG = this.getClass().getName().toString(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_life_logger); Log.d(TAG,"onCreate event"); } @Override

Android Studio 3.1 Logcat prefix not always showing and breaking pretty logger

限于喜欢 提交于 2019-11-28 18:14:52
Since the new version of Android Studio (3.1) the Logcat window doesn't always show the prefix ( 03-28 12:43:01.091 nl.test.app D/log ). I made my own logger, which prints in a pretty way, but this gets broken since some lines are no longer with the same indentation. I'll show an example below. 03-28 12:43:01.091 nl.test.app D/log: ╔═══════════════════════════════════════════════════════════════════════════════════════ ║ [ (TestActivity.kt:33)#OnCreate ] ║ This is my test log 03-28 12:43:01.092 nl.test.app D/log: ║ This is my second test log ╚═══════════════════════════════════════════════════

Saving Logcat to a text file in Android Device

余生颓废 提交于 2019-11-28 16:14:19
I had found some crashes while running the application in android device, which is not showing in emulator. So i need to save the Logcat in a text file in my device's memory or SD card. Could you please suggest me good method to do this? use a Application class at the beginning of your app. That allows a proper file and log handling. Here is an example. That piece of code adds a new folder named “MyPersonalAppFolder” with another folder called “log” in it to the public external storage. after that the logcat output is cleared and the new logcat output is written into a new file called

Can't find my package path in file explorer

别等时光非礼了梦想. 提交于 2019-11-28 14:37:25
My project package doesn't show in DDMS > File Explorer (I had selected my phone in window devices). I found that an error is shown in logcat, which says can't open file for reading. Is it possible that I didn't install Eclipse properly? Before that, my project ran well and I could see the project path in the file explorer (under data>data>). After I had make few changes (I don't recall what changes I had made, too many), when doing another project, I uninstalled and reinstalled Eclipse, then this error appeared. I can't find ALL my project package in file explorer. May I know what is the

android.os.NetworkOnMainThreadException on service start on android

倾然丶 夕夏残阳落幕 提交于 2019-11-28 13:34:15
after trying my brand new service on android i get this: i guess is something related to the manifest file and permissions, the service is started after the last activity, to update data on server and retrieve new data and save id on sqlite on android: here also the manifest file: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ggservice.democracy" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <uses-permission android:name="android.permission.INTERNET"/> <application android:allowBackup

Unfortunately, (app) has stopped - error message in AVD/Eclipse on a new/default application

落花浮王杯 提交于 2019-11-28 12:23:39
问题 I recently installed the ADT/Eclipse bundle on Windows 7 (64 bit). Whenever I try to run an application on the emulator it just says "Unfortunately, app has stopped". I've searched this error and read through loads of fixes on this site and others, but all of them seemed to be having trouble with a particular bit of code. This error is happening without me making any changes to the code. I've tried it with multiple projects, with different minimum and target SDKs, to get the same result. Here

Is there any way to access automatically any Log in Logcat by a double click?

痴心易碎 提交于 2019-11-28 12:19:47
Is there any way to access automatically any Log in Logcat by a double click ? Actually, when there is an error crashing my Android Application, I can double click on the line saying for instance at com.myapp.mypackage$Class.function(File.java:117) And by Double-clicking on this line, I am automatically redirected to the related line of my code. But, when I try to generate the same line in another Log, example : Log.e("TAG", "at com.myapp.mypackage$Class.function(File.java:117)"); The Double-Click doesn't work anymore ... Any ideas ? If you don't mind the clutter in your log, you can easily

Android unable to run logcat from application

只谈情不闲聊 提交于 2019-11-28 11:39:29
问题 So I am writing a profiler that needs to be able to log exceptions during the profiling session. My plan was to use logcat to dump to a file either on the SD card or the internal storage and then when the profiling session was complete, zipping the file up and sending it up to the server. I added the android.permission.READ_LOGS in my manifest, and my code is as follows: public void startLoggingExceptions() { String filename = null; String directory = null; String fullPath = null; String