Common android dead-end problems-Log Analysis
========================================================== ========================================================== ==============================In normal work, a lot of code can be debugged in eclipse + ndk, but if you need to use specific hardware devices, such as media playback devices that cannot be simulated, debugging can only be performed on hardware (
Recently learned the development of cross-platform audio and video communications under the Android platform, although there are many open source projects available on the Internet for our participation. But the audio and video effect is very general, there are a lot of unstable factors, after all, is open source. In China I found a better audio and video communication solution (Baidu download official anychat for
build static Lib. If you build shared Lib, A cannot find-llog error is returned. The library file liblog. So cannot be found.
Therefore, you must change it to local_ldlibs: =-L $ (sysroot)/usr/lib-llog for normal compilation.
The-l parameter specifies the path for searching Lib.
The following is an example of Android. mk content:
Local_path: = $ (call my-DIR)
Include $ (clear_vars)
Local_module: = testndkn
C # How programmers learn Android Development Series and call WebService
The first question I encountered when learning about Android development is how the Android client interacts with the server database? This is a big problem that plagued me when I first came into contact with
Android Native crash log analysis, androidcrash
In the crash type of Android applications, the native type crash should be a relatively difficult one, because there are few contacts, and then there are several more steps to switch, most of them are unfamiliar with this. Although there are many related articles, I still encountered some problems in the course of m
A good article. Thanks to the author for the original article address.
Http://bootloader.wikidot.com/linux:android:crashlog
An android crash in C/C ++ code often generates some crash log which looks like the following. they can be seen either with "ADB logcat" or found in one of the tombstones under/data/tombstones. this article briefly explains the structure of the log
Print call stack Needless to say, basically every developer will use, discuss a few methods, previously said, http://blog.csdn.net/freshui/article/details/9456889 again simple tidy up, wordy on the long-winded:)Basically divided into two categories, one is static, to insert the printed statement into the code, a class is dynamic, need to look at the time to see, real-time observation of the thread call stac
text
humanized output of line breaks
Simple output
Jump from log to source
Logger and native log the biggest difference is: Logger print out the log at a glance, citing the image on the official Github, look at the difference between the native log and the Logger print log:Log printed by native log:Lo
One:acticityActivity is one of the 4 major components of Android programs.Activity is the presentation layer of the Android program. Each display screen of a program is an Activity.Students who have studied Web development can interpret Activity as a JSP file in a Web page, or you can interpret it as a Windows window.ActivityIsAndroidThe display layer of the program, each display window is aActivity; butAct
this operation" is very important thing. For example, if we return true at the end of the Onlongclick () method, then the OnClick event has no chance of being triggered.The following log is the basic timing of a touch operation in the case of the Onlongclick () method return false:04-05 06:00:53.023:debug/tsactivity (277): OnTouch Action_down04-05 06:00:53.533:debug/tsactivity (277): Onlongclick04-05 06:00:55.603:debug/tsactivity (277): OnTouch actio
I recently read a little Android code about log.
For developers, the main calling tool for log reading is logcat, which is followed by some parameters,
If written, Java or C/C ++ has corresponding interfaces.
Code Location:
Frameworks/base/CORE/Java/Android/util/log. Java
Sy
, with the-v option plus the contents listed below to control the output fields:
brief-displays the precedence/markup and PID of the original process (default format)process-only show Process PIDtag-Show priority/Tag onlythread-Show only processes: threads and priorities/tagsraw-Display the original log information, no more metadata fieldstime-display date, call time, priority/tag, PIDlong-displays all of
than or equal to "Debug":ADB logcat activitymanager:i Powermanagerservice:d *:sNote: *:s is used to set the log priority for all tags to s, which ensures that only eligible logs are output.ADB logcat *:w//Show all logs with priority greater than or equal to "warning"ADB logcat-s powermanagerservice//Display Powermanagerservice log informationLogcat Command list:-D exit after displaying the
than or equal to "Debug":ADB logcat activitymanager:i Powermanagerservice:d *:sNote: *:s is used to set the log priority for all tags to s, which ensures that only eligible logs are output.ADB logcat *:w//Show all logs with priority greater than or equal to "warning"ADB logcat-s powermanagerservice//Display Powermanagerservice log informationLogcat Command list:-D exit after displaying the
How to call the stack trace and androidstack for Android programs?
You can find out the call stack trace of a program to know who called this interface, and quickly learn the call process of the program, which is very practical. However, it should be noted that it cannot be used in the official code but can only be use
Android development, the Java layer can easily capture crashlog, but for the Native layer of crashlog is usually not directly accessible, only through the system's Logcat to analyze crash logs.Both Linux and WIN32 developers know that when the program crash on a PC, the core dump file can be generated to parse the function call stack and the memory information at the time of the crash with related tools.So,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.