android - BoostFramework() : mPerf = com. qualcomm.qti.Performance@c4322f2

标签 android android-alertdialog logcat

    public class ForceOfflineReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(final Context context, Intent intent) {
        AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context);
        dialogBuilder.setTitle("Warning");
        dialogBuilder.setMessage("You are forced to be offline. Please try to login again.");
                dialogBuilder.setCancelable(false);
        dialogBuilder.setPositiveButton("OK",
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        ActivityCollector.finishAll(); 
                        Intent intent = new Intent(context,
                                LoginActivity.class);
                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

                        context.startActivity(intent); 
                    }
                });
        AlertDialog alertDialog = dialogBuilder.create();

        alertDialog.getWindow().setType(TYPE_SYSTEM_ALERT);
        alertDialog.show();
    }

}

当我点击按钮时,没有对话框出现。 日志是:

08-21 10:40:05.756 13851-13851/com.project.ics.day0821rememberpassword V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@c4322f2 08-21 10:40:05.757 13851-13851/com.project.ics.day0821rememberpassword V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@667cd43 08-21 10:41:06.499 13851-13851/com.project.ics.day0821rememberpassword W/IInputConnectionWrapper: clearMetaKeyStates on inactive InputConnection 08-21 10:41:07.559 13851-13851/com.project.ics.day0821rememberpassword I/Choreographer: Skipped 57 frames! The application may be doing too much work on its main thread.

github上的源代码: https://github.com/gowufang/AndroidStu/tree/master/Day0821RememberPassword

最佳答案

可能是您没有设置按下按钮时执行的方法的名称,或者拼写错误,我遇到了这个问题,但后来我明白了。(按钮的“onClick”属性名称是未设置或设置错误)

关于android - BoostFramework() : mPerf = com. qualcomm.qti.Performance@c4322f2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45788731/

相关文章:

android - 如何在没有标签的终端中过滤 logcat 消息?

java - 如果对话框文本字段与私有(private)文本字段匹配,系统退出

android - listView 中的自定义 alertDialog

java - 为什么 HttpURLConnection API 中有流?

android - 如何在 Android 中将 CSS 样式代码应用到我的自定义 TextView 中

android AlertDialog 没有边距 - 是什么原因造成的?也许风格问题?

Android:使用正则表达式按标签过滤 Logcat

android - 发布应用后的 Logcat

android - Programmaitcally 在 Android 平板电脑上使用 Zoiper 进行 VOIP 调用

android - 如何在 Android.mk 中正确转义散列?