logcat

android的logcat详细用法!

☆樱花仙子☆ 提交于 2019-12-26 00:20:24
from:// http://www.miui.com/article-272-1.html 【技术交流】android的logcat详细用法! logcat是Android中一个命令行工具,可以用于得到程序的log信息。 见板凳详细说明! 本贴内容来自网络,引用网址为: http://hi.baidu.com/%C9%C1%D2%AB%B5%C4%CB%AE%BD%A7/blog/item/7cc9e1d00715dc369b50271d.html 。 【造成的版权问题,LZ概不负责任!转载请注明出处】, 此贴为技术交流帖,若有疑问请跟贴回复! 谢谢! Android日志系统提供了记录和查看系统调试信息的功能。日志都是从各种软件和一些系统的缓冲区中记录下来的,缓冲区可以通过 logcat 命令来查看和使用. 一、使用logcat命令的目的: 1、你可以用 logcat 命令来查看系统日志缓冲区的内容: [adb] logcat [<option>] ... [<filter-spec>] ... 详细内容,请查看 Listing of logcat Command Options ,它对logcat命令有详细的描述 . 2、你也可以在你的电脑或运行在模拟器/设备上的远程adb shell端来使用logcat命令,也可以在你的电脑上查看日志输出。 $ adb logcat

logCat in separate process creates right number of logs but ignores file size

会有一股神秘感。 提交于 2019-12-25 16:36:09
问题 In our Android App we wish to capture Log messages. We kick off a Process which invokes LogCat, asking for rolling logs. LogCat starts. We get rolling logs. We get the right number of files. In fact allAll the arguments we specify are honored except for the individual file size argument, -r . No matter what argument we specify for -r we get individual 16K files. We've tried -r 10000 and -r 250 and -r 100 and -r 64 . Always 16K files. EDIT: -r 12 (smaller value) also ignored - get 16K files.

adb logcat命令

倾然丶 夕夏残阳落幕 提交于 2019-12-25 07:06:44
[0 adb logcat --help] adb logcat --help -s:设置输出日志的标签, 只显示该标签的日志 -f:将日志输出到文件(手机上) -v:设置日志的输出格式, 注意只能设置一项 -g:查看日志缓冲区信息 -G:设置日志缓冲区 [1 adb logcat -s] adb logcat -s LogUtil adb logcat -s LogUtil Log_C //只显示LogUtil和Log_C的log [2 adb logcat -f] 注意: 这个log文件是输出到手机上,需要指定合适的路径. 该命令对不能一直用电脑连着手机收集日志的场景非常有用. adb logcat -f /sdcard/DCIM/logtest.txt & exit 注意抓取完需要杀掉logcat进程,否则再次使用相同命令的时候,就会有两个logcat写同一个文件了. 抓取完log后杀掉logcat进程: adb shell ps | findstr "logcat" adb shell kill -9 <logcat_pid> [0 adb logcat --help] adb logcat --help -s:设置输出日志的标签, 只显示该标签的日志 -f:将日志输出到文件(手机上) -v:设置日志的输出格式, 注意只能设置一项 -g:查看日志缓冲区信息 -G

Populating an Android SQLite Database

妖精的绣舞 提交于 2019-12-25 02:08:41
问题 Currently i'm trying to populate a database table created in android. I have created a database adapter which allows my activities to run the methods from this adapter. DBAdapter.java package com.example.universitybudgetub; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class

App working fine on emulator but crashes on real device

一个人想着一个人 提交于 2019-12-24 21:56:20
问题 My project runs perfectly on android emulators (Pie 28 and Oreo 26) but when I tried to run it on my real phone which is Lollipop 5.1 ,My app is installed but it does not launch. Every time I open it says "Unfortunately your app has stopped".I have tried to clean ,build apk etc but problem does not changes.Here is my Manifest file , Gradle and stack trace. Process: com.example.user.offlinemobilefinder, PID: 31218 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example

??-?? ??:??:??.???: INFO/<unknown>(<unknown>): Unable to open log device '/dev/log/main': No such file or directory

梦想与她 提交于 2019-12-24 21:28:11
问题 I am developing a new app about Bluetooth. Because the Android Virtual Devices in android SDK can't open the Bluetooth ,I use my I5700 for Debug. But , I can't get any log messages from Eclipse LogCat or CMD . the only log message is the title : ??-?? ??:??:??.???: INFO/(): Unable to open log device '/dev/log/main': No such file or directory I searched stack Overflow and get an answer about it : The Speedmod kernel,This has default Logging disabled. Re-enabled it in the TWEAKS menu. My phone

Why doesn't the php page show the same thing in the LogCat?

与世无争的帅哥 提交于 2019-12-24 17:44:16
问题 My Logcat shows me (correctly) all messages that I want returned, but when I ask the code to display the same thing on another php page, it goes completely wack. Note that is this code, $from = "r", and $to = "". Here is my code: <?php session_start(); /* connect to database */ $db = mysql_connect("localhost", "root", "root"); if (!$db) die('could not connect'); mysql_select_db('androidp2p') or die("could not select database"); /* variables */ $from = mysql_real_escape_string($_POST['from']);

Android listview trouble

无人久伴 提交于 2019-12-24 16:06:14
问题 I'm having problems trying to run an Android activity which implements a ListView, fills it with 20 elements and displays it: the activity crashes upon launch. Here are the relevant LogCat errors: You must supply a resource ID for a TextView FATAL EXCEPTION: main java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:386) at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362) at

Show messages from tablet Samsung Galaxy tab 3 on logcat

泪湿孤枕 提交于 2019-12-24 14:14:17
问题 I have developed an Android app using mapsforge, it works perfect on tablet acer Android 4.0.3 but not works on tablet Samsung Galaxy Tab 3 and on Galaxy dont show the logs on logcat, in fact dont show anything, i think that i have problems when the map is deployed. I am using alogcat app and abd from terminal but it dont show the logs for my app. I am trying put on Manifiest (android:debuggable=true). How can i show the logs on logcat in Galaxy tab 3? Any ideas 回答1: try to delete the

LogCat won't show my logs

て烟熏妆下的殇ゞ 提交于 2019-12-24 13:08:06
问题 I've searched for similar problems, but I didn't find anything useful - I'm working with eclipse , and I can't see my Logs. The device is connected properly, the app runs and does what it's supposed to do, but I get no logs from it. I get other logs messages from the device, not the ones that I print, e.g. Log.d("SMS", "hello") . On the other hand, if I use the statement System.out.println("hello") , I do see it, tagged as System.out . I've tried to disconnect and reconnect the device,