更新时间:2023-11-19 13:48:28
取消注释此行
setContentView(R.layout.places);
已编辑:
<?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" android:padding="6dip">
<ListView android:id="@android:id/list" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
将其替换为您的文件(Places.xml)
replace this with your file(Places.xml)
更新
public void onCreate(Bundle savedInstance) {
super.onCreate(savedInstance);
//setContentView(R.layout.places);
getallLocs();
setListAdapter(new ArrayAdapter<Fields>(this,android.R.layout.simple_list_item_1, results));
// displayLocs();
}
private void displayLocs() {
lv = (ListView)findViewById(R.id.listPlaces);
lv.setAdapter(new StudentListAdapter(this, R.layout.placeslist, results));
//lv.setAdapter(new ArrayAdapter<Fields>(this,android.R.layout.simple_list_item_1, results));
}
错误:转换结果时出错java.lang.NullPointerException:lock == null由java.lang.NullPointerException引起
捕获错误 MQException:2059 - MQRC_Q_MGR_NOT_AVAILABLE .Net Core Linux Docker 容器 IBM MQ,由密码规范不匹配引起
捕获错误 MQException:2059 - MQRC_Q_MGR_NOT_AVAILABLE .Net Core Linux Docker 容器 IBM MQ,由密码规范不匹配引起
Android的 - java.lang.IllegalArgumentException:如果contentIntent需要引起通知错误?