我在Eclipse Android项目中使用了这段代码
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
Run Code Online (Sandbox Code Playgroud)
但Eclipse说:
此方法在API级别3中已弃用.对BUTTON_POSITIVE使用setButton(int,CharSequence,android.content.DialogInterface.OnClickListener)
当我在 VSCode 上重新启动调试时,我得到以下输出:
Error -32000 received from application: Service protocol could not handle or find a handler for the requested method.
Restarted application in 1,009ms.
Run Code Online (Sandbox Code Playgroud)
热重载也给出了这个错误:
Hot reload received invalid response: {type: Sentinel, kind: Collected, valueAsString: <collected>}
Run Code Online (Sandbox Code Playgroud)
我的环境是:
Mac OS X 10.15 19A602
VSCode 1.40.1
Flutter v1.9.1+hotfix.6
' Android iOS 模拟器' 1.3.0 这是 VSCode 扩展
当我在停止后开始时,调试它可以工作,但这不是解决方案,因为它比重新启动或热重载功能更长。