嗨,大家好我的朋友寫了一個項目,他通過我這個項目,我用eclipse導入它,我糾正了一些錯誤,因爲我沒有使用library.Now仍然是唯一的錯誤,我不知道如何解決它。 PS:對我的朋友來說,這個項目工作正常,運行沒有錯誤。 錯誤給我的是標題。 這是代碼:View.OnClickListener無法解析到
package it.sapienzaapps.ingvterremoti.beAlerted.object;
import javax.swing.text.View;
import android.graphics.drawable.Drawable;
import android.widget.BaseAdapter;
public abstract class FriendPicker {
private Drawable icon;
private String text1;
private String text2;
private int requestCode;
private BaseAdapter adapter;
protected abstract View.OnClickListener getOnClickListener();
public FriendPicker(Drawable icon, String text1, String text2,
int requestCode) {
super();
this.icon = icon;
this.text1 = text1;
this.text2 = text2;
this.requestCode = requestCode;
}
public int getRequestCode() {
return requestCode;
}
public void setRequestCode(int requestCode) {
this.requestCode = requestCode;
}
public Drawable getIcon() {
return icon;
}
public void setIcon(Drawable icon) {
this.icon = icon;
}
public String getText1() {
return text1;
}
public void setText1(String text1) {
this.text1 = text1;
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
public String getText2() {
return text2;
}
public void setText2(String text2) {
this.text2 = text2;
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
public void setAdapter(BaseAdapter adapter) {
this.adapter = adapter;
}
}
什麼是'abstract'修改的變量聲明嗎? – selbie