2014年7月6日 星期日

[Error] The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments

出現在程式碼內的錯誤
xxx.setOnClickListener(this);

手機上執行後會出現
The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments
的錯誤訊息

解決辦法:
在class後新增implements View.OnClickListener

沒有留言:

張貼留言