我在 android 应用程序中出现错误构造函数 ArrayAdapter(Menu, int, String[]) 未定义这是我的代码:
package com.example.may_sec;
import android.R.string;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Menu extends ListActivity
{
//the menu options:
String activitys1[] = {"MainActivity", "Splash"};
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<string>(Menu.this, 0, activitys1) );
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);
}
我做了一些搜索,但可以找到答案..