我想在intent服务中显示一个警告对话框.
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
Run Code Online (Sandbox Code Playgroud)
这会引发以下异常
Unable to add window — token null is not for an application
Run Code Online (Sandbox Code Playgroud)
我也尝试过IntentService.this和getApplicationContext().之间我不想使用活动.我只是想用一个小文本显示一个简单的警告对话框.