gpt4 book ai didi

android - ANR 输入调度超时(等待,因为没有窗口有焦点,但有一个可能最终有焦点的应用程序)

转载 作者:行者123 更新时间:2023-12-04 23:50:15 26 4
gpt4 key购买 nike

我的应用程序(Xperia Z1 Compact,Android 5.1)的用户在设置我的应用程序时遇到了崩溃。这是工作流程:

LaunchActivity 是 Launch Intent (noHistory=true, singleTask)。它检查这是否是应用程序的第一次启动。这是第一次启动,所以它会启动 BootActivity (noHistory=true, singleTask)。 BootActivity 显示 3 秒的动画,然后打开 AddGoogleNewsActivity (singleTask)。这是打开 AddGoogleNewsActivity 的代码:

在 onCreate 中:

new Handler().postDelayed(new Runnable() {

@Override
public void run() {
endSplash();
}
}, 3000);


private void endSplash() {
YoYo.with(Techniques.FadeOut)
.duration(1000)
.interpolate(new AccelerateDecelerateInterpolator())
.withListener(new com.nineoldandroids.animation.Animator.AnimatorListener() {
@Override
public void onAnimationStart(com.nineoldandroids.animation.Animator animation) {

}

@Override
public void onAnimationEnd(com.nineoldandroids.animation.Animator animation) {
}

@Override
public void onAnimationCancel(com.nineoldandroids.animation.Animator animation) {

}

@Override
public void onAnimationRepeat(com.nineoldandroids.animation.Animator animation) {

}
})
.playOn(logo);
YoYo.with(Techniques.FadeOut)
.duration(1000)
.interpolate(new AccelerateDecelerateInterpolator())
.playOn(title2_txt);
YoYo.with(Techniques.FadeOut)
.duration(1000)
.interpolate(new AccelerateDecelerateInterpolator())
.playOn(title_txt);
new Handler().postDelayed(new Runnable() {

@Override
public void run() {
if (intent.equals("start")) {
startActivity(new Intent(BootActivity.this, AddGoogleNewsActivity.class));
} else if (intent.equals("complete")) {
Intent goToBoot = new Intent(BootActivity.this, HomeActivity.class);
goToBoot.putExtra("intent", "setupdone");
startActivity(goToBoot);
}
}
}, 1000);
}

在 AddGoogleNewsActivity 中,该应用获得了 ANR:
ANR 输入调度超时(等待,因为没有窗口具有焦点,但有一个焦点应用程序可能最终在完成启动时添加一个窗口。)

有人知道我该如何解决这个问题吗?

非常感谢!

最佳答案

从 2017 年 5 月 30 日开始编辑:真正的解决方案是这些设备没有可用的文本到语音服务,我需要完全禁用对它的访问以阻止这些崩溃。

关于android - ANR 输入调度超时(等待,因为没有窗口有焦点,但有一个可能最终有焦点的应用程序),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33857793/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com