写了个ListView,打开就崩溃

用的Android Studio。Activity自动在manifests里注册了。
将该activity设置为打开加载页面时,打开就直接闪退。
错误信息一闪就没了...

Java代码:
package com.demo.listview;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class MyLIST extends Activity {

private String[] list=getResources().getStringArray(R.array.lesson_name_list_cn);
private ListView lv;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_list);
    lv=(ListView)findViewById(R.id.lv);

    lv.setAdapter(new ArrayAdapter<>(this,
            android.R.layout.simple_list_item_1,list));
}

}

XML:
<?xml version="1.0" encoding="utf-8"?>
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.demo.listview">

<!--添加一个ListView控件-->
<ListView
    android:id="@+id/lv"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

</ListView>

看看是不是有没有处理的异常,特别是构造函数以及加载的逻辑

你用了simple_list_item_1那么list VIew的id你得设为@id/android:list

你的xml文件格式确定复制的没问题?外面用个布局比如liearlayout包住

请提供异常的 LOG
一般可能是 list 控件 ID 在 XML 中的定义,与代码中使用的不相同。

1.加一个泛型:

lv.setAdapter(new ArrayAdapter<String>(this,
            android.R.layout.simple_list_item_1,list));

2.用LinearLayout包裹ListView:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
  <!--添加一个ListView控件-->
<ListView
    android:id="@+id/lv"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>





</LinearLayout>

3.
再次确认下你的activity是不是注册上了..

另外就是贴一个报错信息吧。。