NOTE: attach of thread 'Binder Thread #3' 错误

gaohongijj 2012-04-04 03:25:42
本人写了个ListView的测试程序,但最终结果显示不出来,用logcat提示:
04-04 07:14:26.308: INFO/AndroidRuntime(337): NOTE: attach of thread 'Binder Thread #3' failed
04-04 07:14:28.218: INFO/ActivityManager(60): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=gao.ListView/.ListViewTest }
04-04 07:14:28.278: INFO/AndroidRuntime(345): NOTE: attach of thread 'Binder Thread #3' failed
我写的代码如下:
ListViewTest.java代码:
(1)package gao.ListView;

import java.util.ArrayList;
import java.util.HashMap;

import android.app.Activity;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.SimpleAdapter;

public class ListViewTest extends ListActivity {

public void onCreate(Bundle savedInstanceState, String gao) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ArrayList< HashMap<String,String>> list = new ArrayList< HashMap<String,String>>();
HashMap<String,String> map1 = new HashMap<String, String>();
HashMap<String,String> map2 = new HashMap<String,String>();
HashMap<String,String> map3 = new HashMap<String,String>();
map1.put("user_name", "gao");
map1.put("user_ip","192.168.0.1");
map2.put("user_name", "yang");
map2.put("user_ip", "192.168.0.2");
map3.put("user_name","li");
map3.put("uaer-ip","192.168.0.3");
list.add(map1);
list.add(map2);
list.add(map3);
SimpleAdapter listAdapter=new SimpleAdapter(this, list, R.layout.user,
new String[]{"user_name","user_ip"},
new int[]{R.id.user_name,R.id.user_ip});
setListAdapter(listAdapter);
}

}

(2)main.xml代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="vertical"
></ListView>
</LinearLayout>

(3)user.xml的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="10pt"
android:singleLine="true"
></TextView>

<TextView
android:id="@+id/user_ip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="10pt"
android:gravity="right"
></TextView>

</LinearLayout>

小弟初学android,,请各位大侠帮忙,,,
...全文
595 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
kwapoong 2012-04-21
  • 打赏
  • 举报
回复
because your ListViewTest extends ListActivity, you should make sure the id of ListView in main.xml is "@android:id/list" not "@+id/android:list"
b87936260 2012-04-09
  • 打赏
  • 举报
回复
没看出有什么问题,程序崩溃了没?还是只是一片漆黑?贴更多log看看!
源码下载地址: https://pan.quark.cn/s/0d6e3002ba51 ### IR2110中文资料知识点详述 #### 一、概述 IR2110是一种专为脉冲宽度调制应用而设计的高性能驱动集成电路,在各类功率转换设备中具有广泛的应用,特别是在需要实现隔离驱动的场景下表现出色。该芯片融合了光电隔离与电磁隔离的优势,能够达成快速响应并保持较小的物理尺寸,尤其适合用于中小功率的变换装置。 #### 二、IR2110内部结构与特点 **1. 内部结构** - **封装形式**:采用DIP14引脚封装。 - **内部组成**:由逻辑输入单元、电平平移单元以及输出保护单元这三个主要部分构成。 - **悬浮电源**:借助自举电路实现,使得高端工作电压最高能够达到500V,支持±50V/ns的电压变化率。 - **工作电压范围**:逻辑电源电压范围为5~15V,输出电源端电压范围为10~20V,易于与其他逻辑电平进行匹配。 - **工作频率**:最高可达到500kHz。 - **功耗**:在15V条件下静态功耗仅为116mW。 - **延迟时间**:导通延迟120ns,关断延迟94ns。 - **峰值输出电流**:图腾柱输出峰值电流为2A。 **2. 特点** - **独立输入通道**:具备独立的低端和高端输入通道配置。 - **兼容性**:逻辑电源地与功率地之间允许±5V的偏移量,便于与TTL或CMOS电平进行匹配。 - **自举电源**:内置自举电源电路,有效减少驱动电源的数量,从而简化电路设计。 - **高dv/dt能力**:具有较强的dv/dt抑制能力,适合高频开关应用。 - **低功耗**:工作状态下功耗较低,有利于提升整体效率。 #### 三、高压侧...

80,488

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧