我是新来的,所以原谅我的原始问题,我真的没有得到这个。我只是建立在我的主要活动这个阵列,同时在做一个教程,我得到一个错误类型不匹配:无法从字符串转换为R.string
package com.TaskReminder;
import android.R.string;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
public class ReminderListActivity extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.reminder_list);
string[] items = new string[]{"aa","bb"};
ArrayAdapter<string> adapter = new ArrayAdapter<string>(this,R.layout.reminder_row,R.id.text1,items);
setListAdapter(adapter);
}
和我的字符串数组上的错误是:
在该行 多个标记 - 行断点:ReminderListActivity [行:14] - 的onCreate(束)
- 类型不匹配:不能从字符串转换成R.string
这里究竟发生了什么?
谢谢!我无法描述我的感觉多么愚蠢,我的编程越来越生疏:P必须潜入! – TrackmeifYouCan