logcat

Can logcat be used to log NDK code in Android? Or what are logging options from NDK?

ε祈祈猫儿з 提交于 2019-12-03 09:06:41
问题 How would one write logs from inside Native code in Android (NDK)? What are the available options? For example, can logcat be used from inside of NDK to write logs? Or since its more upper level in android, it can not be accessible from NDK? At the moment I am just aware of writing times from C code with: millis = System.currentTimeMillis(); And with function that would write this time plus any messages to a custom log file. 回答1: You can use the Android logging #include <android/log.h>

What does the logcat warning `Unknown element under &lt;manifest&gt;: meta-data` mean?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: While running a a freshly installed app, I find this Warning messages in the logcat: W/PackageManager( 1233): Couldn't remove dex file for package: at location /data/app/xx.yy.zz-1/base.apk, retcode=-1 I/SmartHeartBeat( 1233): listenAppUpdate, package: xx.yy.zz has been Updated W/PackageParser( 2909): Unknown element under <manifest>: meta-data at /storage/emulated/0/xxx/zz.apk Binary XML file line #143 Trying to track down the offending meta-data element tagged Binary XML file line #143 , I find the following: # aapt l -a zz.apk

What to do if manufacturer removed folders under /dev/log folder? [means No LogCat]

隐身守侯 提交于 2019-12-03 08:45:48
I'm in trouble with my android device in which log folder under /dev is unreachable or maybe even does not exists. $ pwd pwd /dev $ cd log cd log cd: can't cd to log $ So LogCat is out-of-service and I cannot view device's stdout or stderr logs in DDMS. I googled a little bit and tried to find some information for about this problem: http://developer.android.com/guide/developing/tools/adb.html#alternativebuffers Viewing stdout and stderr topic seemed to be useful but this thread says it is unsupported : Why is redirecting stdout/stderr on android not working? Here is another one having the

How to change size of logcat buffer in Android?

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I noticed that the size of the logcat buffer varies on different devices. Assuming I have root permissions on my device, is there a way to change the buffer size of the main buffer at runtime? If not, then assuming I can rebuild the Android image, how do I change it at compile time? I'm looking to enlarge it for diagnostic purposes. 回答1: According to the newsgroup Android Developers , logcat buffer size : The log buffers on the device are 64 KB. The timestamp, process ID, and log level are stored in a compact format, so you may actually get

Android logcat “application” column is always empty

本秂侑毒 提交于 2019-12-03 08:26:07
问题 Android logcat "application" column is always empty. I have latest version of android tools. 回答1: I tried all the other suggestions here and none of them worked. For me, the application is shown when running on the emulator, but not on my Galaxy Nexus. It turns out I needed to add android:debuggable="true" to <application> in my AndroiManifest.xml . See http://developer.android.com/guide/topics/manifest/application-element.html. People who use Eclipse don't see this problem because apparently

Automatically clearing LogCat on each Eclipse Debug/Run?

馋奶兔 提交于 2019-12-03 07:27:37
问题 I expected this to be a simple task, but I'm surprised to find no answers for this. Let me clarify: I do not want to call adb logcat -c manually. In fact, I'm not even using the command line to view LogCat, so I don't think this is possible (edit: actually, it is, by running the command in a separate command line...but I don't want to do that) . I'm using Eclipse to view LogCat. I do not want to click button Clear Log each time. That's what I'm doing now. I do , programatically or through

Why do I see “No Debuggable Applications” in Android Studio Logcat while my application is running?

北慕城南 提交于 2019-12-03 06:30:57
问题 I wanted to filter what is shown in the Android Studio Logcat to show what is relevant to my application only. I have chosen Show only selected applications from the drop down at the top of the logcat as shown in the following screenshot: But in the drop down menu above it which is supposed to show running application(s) (and other options) from which we can choose our application to see Log messages related to it only, I see No debuggable Applications as the only option. Why? WHat should I

Android Studio logcat history/buffer size

时间秒杀一切 提交于 2019-12-03 06:30:20
问题 Does anyone know if there a way to increase the size of the logcat history/buffer in Android Studio? I remember there was a way to do it in Eclipse and was hoping Android Studio had a similar setting. 回答1: You can also do it per project, via the IDE: Settings->Editor->General->Console: tick "Override console cycle buffer size. Enter your desired size in the text box. Finally restart Android Studio for the changes to take effect. 回答2: You can increase the value of idea.cycle.buffer.size=1024

Error on genymotion power_supply

谁说胖子不能爱 提交于 2019-12-03 06:12:01
Im using genymotion to emulate my cordova app, and the logcat shows me this error every time. E/Genymotion( 459): Could not open '/sys/class/power_supply/genymotion_fake_path/present' To run my app I'm using a shell command: cordova build && adb install -r platforms\android\bin\Example-debug.apk && adb shell am start -n br.com.example/br.com.example.Example And to see the logcat I'm using: adb logcat Android tools allows you to filter the log output. Your can use DDMS to show the logs and add a filter corresponding to your app. Fill the filter field with your package name for example and you

Display Logcat in Terminal?

我只是一个虾纸丫 提交于 2019-12-03 05:26:13
问题 Edit/Solution: execute ./adb logcat in the platform-tools directory. Original Question: I know that there's a way to display the LogCat for an Android device/emulator in Terminal on my Mac, but I'm not sure what the command is. This is mostly due to my incompetence with UNIX commands. Here are my previous failures: adb logcat adb.exe logcat FULL_PATH_TO_PLATFORM_TOOLS/adb logcat FULL_PATH_TO_PLATFORM_TOOLS/adb.exe logcat 回答1: Ah, just adb logcat should work. You may need to do an explicit