任何人都知道为什么Logcat没有显示完整的消息?我尝试从我的网站打印xml响应,但我只能得到一些..
我刚刚安装了最新版本SDK和ADT.当我打开logcat时我发现整个logcat充满了以下消息.我不会在eclipse上启动任何项目!
PgaSocketWriteAllHdipc: hd_ipc_send() failed
hd_ipc_send: not connected
Run Code Online (Sandbox Code Playgroud)
我只用了10分钟,这种消息的数量超过了10,000,我对此感到厌烦.请告诉我如何删除此消息出现在logcat中.
我的LogCat出现了一些错误......
E/Trace(627): error opening trace file: No such file or directory (2)
Run Code Online (Sandbox Code Playgroud)
然后我找不到解决方案请帮助我.PS.我正在尝试将我的avd SD卡空间设置为256MB,但这个错误太相同了
-----------------我的LogCat -----------------
06-24 02:31:13.450: E / Trace(627): error opening trace file: No such file or directory (2)
06-24 02:31:14.290: D / libEGL(627): loaded /system/lib/egl/libEGL_emulation.so
06-24 02:31:14.300: D / (627): HostConnection::get() New Host Connection established 0x2a08fd48, tid 627
06-24 02:31:14.310: D / libEGL(627): loaded /system/lib/egl/libGLESv1_CM_emulation.so
06-24 02:31:14.320: D / libEGL(627): loaded /system/lib/egl/libGLESv2_emulation.so
06-24 02:31:14.390: W / EGL_emulation(627): eglSurfaceAttrib not implemented
06-24 02:31:14.400: D / OpenGLRenderer(627): Enabling debug …Run Code Online (Sandbox Code Playgroud) 我正在开发一个Android应用程序,我通过Intents调用Google Translate应用程序.这里描述的过程非常有用,但我无法弄清楚为什么我的应用程序崩溃说"没有找到活动来处理Intent".
提前致谢!
这是我的代码,
public void translate()
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, "hello");
intent.putExtra("key_text_input", "hello");
intent.putExtra("key_text_output", "");
intent.putExtra("key_language_from", "en");
intent.putExtra("key_language_to", "mal");
intent.putExtra("key_suggest_translation", "");
intent.putExtra("key_from_floating_window", false);
new ComponentName(
"com.google.android.apps.translate",
"com.google.android.apps.translate.HomeActivity");
startActivity(intent);
}
Run Code Online (Sandbox Code Playgroud)
这就是我的logcat显示的内容
04-20 07:29:01.647: E/AndroidRuntime(31465): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 (has clip) (has extras) }
04-20 07:29:01.647: E/AndroidRuntime(31465): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
04-20 07:29:01.647: E/AndroidRuntime(31465): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1423)
04-20 07:29:01.647: E/AndroidRuntime(31465): at android.app.Activity.startActivityForResult(Activity.java:3388)
04-20 07:29:01.647: E/AndroidRuntime(31465): at android.app.Activity.startActivityForResult(Activity.java:3349)
04-20 07:29:01.647: E/AndroidRuntime(31465): at android.app.Activity.startActivity(Activity.java:3584) …Run Code Online (Sandbox Code Playgroud) 我已经搜索过,我发现下面的代码会让我的程序读取android中logcat的输出.但是,在我调用此函数后,没有任何反应.除了"logcat called"之外,没有任何内容通过system.out输出.I真的不知道发生了什么,因为这里的很多帖子告诉我这会有效:<
public void Collector_logcat(){
String stringbuffer="";
String command="logcat -d";
String command_c="logcat -c";
System.out.println("logcat called\n");
try{
m_logcatprocess=Runtime.getRuntime().exec(command);
m_logcat_inputreader=new InputStreamReader(m_logcatprocess.getInputStream());
m_logcat_reader=new BufferedReader(m_logcat_inputreader);
while((stringbuffer=m_logcat_reader.readLine())!=null){
System.out.println(stringbuffer+"\n");
}
Runtime.getRuntime().exec(command_c);
}
catch(Exception ex){
System.out.println(ex.getMessage());
System.out.println("error in Collector_logcat\n");
}
return ;
}
Run Code Online (Sandbox Code Playgroud) 我创建了SeekBar类的扩展:
package com.simplemathgame;
import android.content.Context;
import android.widget.SeekBar;
import android.widget.TextView;
public class SeekBarPlus extends SeekBar {
private TextView numberOfDrills;
public SeekBarPlus(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
// TODO Auto-generated method stub
numberOfDrills.setText(progress);
}
public void setTextView(TextView textView){
numberOfDrills = textView;
}
}
Run Code Online (Sandbox Code Playgroud)
这是xml布局文件:
<?xml version="1.0" encoding="utf-8"?> …Run Code Online (Sandbox Code Playgroud) 我有一个日志猫,它输出到文本文件,但找不到每个部分的含义。例如,我有以下内容:
W/Trace ( 857): Unexpected value from nativeGetEnabledTags: 0
E/ActivityThread( 565): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408 that was originally bound here
E/ActivityThread( 565): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408 that was originally bound here
E/ActivityThread( 565): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
Run Code Online (Sandbox Code Playgroud)
我不确定每个部分代表什么意思,我假设W /表示警告,E /表示错误。但不确定文本是否在斜杠之后。我也不确定括号中的数字。
感谢您的任何帮助,您可以提供。
我正在尝试创建一个批处理文件,它将执行我每天使用的一些ADB命令.我坚持使用adb logcat,因为logcat永远不会结束.有这么多秒后结束它的方法吗?目前我有
:logcat
adb logcat
pause>nul|set /p "=Press any key to return to the menu"<nul&echo(
cls
goto start
Run Code Online (Sandbox Code Playgroud)
认为暂停将允许我在完成从日志中获取所需内容时手动结束它.
有办法结束命令吗?
谢谢
我使用Eclipse,我想使用我的设备调试我的应用程序,但不会损坏它的电池,因为我应该总是在它仍然没有放电时充电.是否可以将设备连接到adb而无需通过USB连接?
我尝试使用logcat应用程序,但它有点不舒服.我搜索了一个不需要root的应用程序并记录了日志,但我没有找到它.