[英]Can't be resolved as a type android Eclipse
It is saying that popupWindow.OnDismissListner
Can't be resolved as a type and when I hover the mouse over it the only option I get is to make it an interface, which isn't what I want to do. popupWindow.OnDismissListner
无法将popupWindow.OnDismissListner
解析为一种类型,当我将鼠标悬停在其上方时,我得到的唯一选择是使其成为接口,这不是我想要的。
public class MainActivity extends Activity implements OnItemSelectedListener,
PopupWindow.OnDismissListener, View.OnClickListener {
I am unsure exactly what is wrong. 我不确定到底出了什么问题。 I imported android.widget.PopupWindow.OnDismissListener;
我导入了android.widget.PopupWindow.OnDismissListener;
and it still is giving the error. 并且它仍然给出错误。 I am trying to get a menu to pop up with a list of dice and when a dice is clicked it will return a matching int value based on how many sides the dice has. 我正在尝试弹出一个带有骰子列表的菜单,单击骰子时,它将基于骰子的边数返回匹配的int值。 I have no other errors except the one mentioned above. 除上述错误外,我没有其他错误。
Try replacing 尝试更换
import android.widget.PopupWindow.OnDismissListener;
with 与
import android.widget.PopupWindow;
Or simply use OnDismissListener
in your code (not PopupWindow.OnDismissListener
). 或者只是在代码中使用OnDismissListener
(而不是PopupWindow.OnDismissListener
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.