首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Crash App android Activity t40}超时

Crash App android Activity t40}超时
EN

Stack Overflow用户
提问于 2016-07-05 03:52:09
回答 3查看 643关注 0票数 0

我在Eclipse中创建了一个应用程序,它在很多手机上都工作得很好,但在少数手机上加载时会崩溃

我的红色原木猫如下:

代码语言:javascript
复制
07-04 13:39:55.865: E/WindowManager(1048): Starting window AppWindowToken{42bcf4f0 token=Token{42bc5a70 ActivityRecord{4276f370 u0 com.iran.sunni.times.azan.alarms/com.iran.sunni.times.azan.alarm.PrayerTimeActivity t40}}} timed out
07-04 13:39:56.025: E/Parcel(528): Reading a NULL string not supported here.
07-04 13:39:56.025: E/Parcel(528): Reading a NULL string not supported here.
07-04 13:40:10.425: E/Sensors(1048): Recevied Proximity Sensor pollEvents
07-04 13:40:10.425: E/Sensors(1048): Recevied Proximity Sensor pollEvents
07-04 13:40:10.425: E/Sensors(1048): Recevied Proximity Sensor pollEvents
07-04 13:40:10.435: E/Sensors(1048): Recevied Proximity Sensor pollEvents
EN

回答 3

Stack Overflow用户

发布于 2016-07-05 04:03:03

您在onCreate函数的主线程上花费的时间太长。你的应用程序需要在几秒钟内启动,否则Android会认为它坏了。没有代码,我不知道为什么花了这么长时间,你必须去调查一下。

票数 2
EN

Stack Overflow用户

发布于 2016-07-05 15:14:26

正如Gabe所说的,你在OnCreate做了太多的工作。将所有这些函数、读取文件等等移动到后台线程中,并向用户显示一个进度对话框(代码在314 -322行之间),你的应用程序需要很长时间才能启动,而android会终止它。只要我启动我的电脑,我就会用一个例子来编辑答案。

票数 1
EN

Stack Overflow用户

发布于 2016-07-06 06:15:11

显然,您的ajustTime()方法中存在问题。

代码语言:javascript
复制
public void ajustTime() {
    {
        String dtFajarSetting = Settings.storeData.getTextData("At0");
        if (!dtFajarSetting.equals("")) {
            String[] dnValue = dtFajarSetting.split(",");
            int index = Integer.parseInt(dnValue[0]);
            int totalMin = Integer.parseInt(dnValue[1]);
            paryerData.add(index, addMin(totalMin, paryerData.get(index)));
            paryerData.remove(index + 1);
        }
    }

在Logcat中检查索引和totlaMin,如下所示

代码语言:javascript
复制
Log.d("Check","Index = "+ index +"totalMin=" +totalMin);

在ajustTime()方法中判断它们是否为空。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38191432

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档