gpt4 book ai didi

java - 安卓 E/Trace(627) : error opening trace file: No such file or directory (2)

转载 作者:行者123 更新时间:2023-11-29 07:47:26 26 4
gpt4 key购买 nike

我的 LogCat 出现一些错误...

E/Trace(627): error opening trace file: No such file or directory (2)

然后我找不到解决方案请帮助我。附言。我正在尝试将我的 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 mode 0

----------------我的源代码----------------

package com.nathaniel.web_list_20113212_nathaniel;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Web_List_Activity extends Activity implements OnClickListener {
DBManager dbmgr;
SQLiteDatabase sdb;
Cursor cur;
int list_count;

LinearLayout layout_weblist;
Button prev_btn;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.web_list);

layout_weblist = (LinearLayout)findViewById(R.id.weblist_area);

dbmgr = new DBManager(this);
sdb = dbmgr.getReadableDatabase();
cur = sdb.rawQuery("SELECT * FROM Websites", null);
list_count = cur.getCount();

if(list_count < 1) {
TextView tv = new TextView(this);
tv.setText("등록된 웹사이트가 존재하지 않습니다.");
tv.setGravity(Gravity.CENTER);
tv.setTextSize(20);
layout_weblist.addView(tv);
}
else if(list_count > 1) {
cur.moveToNext();

LinearLayout layout_webcontent = new LinearLayout(this);
layout_webcontent.setOrientation(LinearLayout.HORIZONTAL);
layout_webcontent.setBackgroundColor(Color.parseColor("#BBDEF8"));

/* <Column Line>
* wid integer
* wname text
* waddress text
* remark text
* hits integer */
String[] column = {String.valueOf(cur.getInt(0)), cur.getString(1), cur.getString(2), cur.getString(3), String.valueOf(cur.getInt(4))};
TextView[] tv_content = new TextView[5];

for(int i = 0; i < 5; i++) {
tv_content[i].setGravity(Gravity.CENTER);
tv_content[i].setText(column[i]);

layout_webcontent.addView(tv_content[i]);
layout_webcontent.setId(i);
layout_webcontent.setOnClickListener(this);
}

layout_weblist.addView(layout_webcontent);
}

}

@SuppressWarnings({ "deprecation", "null" })
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
LayoutInflater html_layer;
View html_view = null;

if(v.getId() != list_count) {
html_layer = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
html_view = html_layer.inflate(R.layout.web_html, null);
this.addContentView(html_view, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
cur.moveToPosition(v.getId());

String waddr = cur.getString(2); // address
TextView tv_html = (TextView)findViewById(R.id.htmlview);

URL url = null;
HttpURLConnection urlConnection = null;
BufferedInputStream buf = null;

try {
url = new URL(waddr);
urlConnection = (HttpURLConnection)url.openConnection();

buf = new BufferedInputStream(urlConnection.getInputStream());
BufferedReader bufreader = new BufferedReader(new InputStreamReader(buf, "utf-8"));

String line = null;
String page = "";

while((line = bufreader.readLine()) != null) {
page += line;
}

tv_html.setText(page);
}
catch(Exception e) {
Log.i("############", e.getMessage());
}
finally {
urlConnection.disconnect();
}
}
else
((ViewManager)html_view.getParent()).removeView(html_view);
}
}

最佳答案

The error message comes from the systrace code. It indicates that your device doesn't support systrace tracing. You can ignore it.

Source

关于java - 安卓 E/Trace(627) : error opening trace file: No such file or directory (2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24377571/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com