Activity 不会随机呈现,三星只显示白屏 [英] Activity won't render randomly, shows only white screen on Samsung

查看:44
本文介绍了Activity 不会随机呈现,三星只显示白屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我承认这是一个非常模糊的问题.发生的情况是非常随机且很少仅在三星设备(2x S3 和 1xS4 mini)上启动活动(基本上是任何活动,我没有找到共同点)不会呈现并且只显示白屏.有趣的是,实际上视图就在那里,我可以单击白色屏幕,当我点击正确的位置时,我可以使用按钮打开对话框,然后转到下一个活动.更奇怪的是,当下一个活动使用动画打开时,我可以看到活动的几分之一秒.

So, I acknowledge that this is a truly vague question. What happens is that very randomly and rarely on only Samsung devices (2x S3 and 1xS4 mini) the starting activity (basically any activity, I have not found common ground) won't render and shows only a white screen. The funny thing is that actually the views are there, I can click the white screen and when I hit the correct spots, I can open dialogs using buttons, and go to the next activities. What is more weird is the fact that when the next activity opens using an animation, I can see the activity for a fraction of a second.

那么,有没有人见过或经历过这种情况?

So, has anyone ever seen or experienced this?

注意:由于这是一个如此随机的错误,我需要在此处复制整个项目以获得代码示例,但我不能这样做.

Note: As this is such a random bug, I would need to copy the whole project here for code samples and I just cannot do that.

推荐答案

Google 知道 各种设备上的 appcompat 存在问题,例如

It is known to Google that there is a problem with appcompat on various devices, such as

(约 100 个用户):
- 50% Enspert(Rainbow,可能是提到的 Wiko 模型 #8)
- 30% 三星(SM G3815、SM G730A、SM T217A、GT S7275B、GT S7275R)
- 10% MyPhone (Agua Rio)

(~100 users):
- 50% Enspert (Rainbow, likely the Wiko model #8 mentioned)
- 30% Samsung (SM G3815, SM G730A, SM T217A, GT S7275B, GT S7275R)
- 10% MyPhone (Agua Rio)

线程说(2 月 8 日)

The thread says (on Feb 8th)

这可能会被下一个版本的 AOSP 提交修复":https://android-review.googlesource.com/#/c/198301/

This is potentially 'fixed' by an AOSP commit which will be in the next release: https://android-review.googlesource.com/#/c/198301/

另请参阅 github 问题,其中提到了

See also the github issue where it is said

各种三星手机都在框架或类路径中包含旧版本的 android 支持库.

Various Samsung phones are including older versions of the android support library in the framework or classpath.

有关可能的解决方法,请参阅 appcompat-v7 v21.0.0 导致在装有 Android v4.2.2 的三星设备上崩溃,其中建议的解决方案是

For a possible workaround, see appcompat-v7 v21.0.0 causing crash on Samsung devices with Android v4.2.2, where the proposed solutions are

使用

-keep class !android.support.v7.internal.view.menu.**,android.support.v7.** {*;}

更好的解决方案是添加以下几行:

The better solution is add the following lines instead:

-keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }

<小时>

更新:似乎已在 android 7.0 appcompat 库 (SDK 24.0) 中修复


Update: seems like it's fixed in the android 7.0 appcompat library (SDK 24.0)

根据错误报告的最后一篇文章,这应该被修复新版本的支持库(24):https://code.google.com/p/android/问题/细节?id=78377#c374

According to the last posts of the bug-report, this should be fixed on the new version of the support library (24) : https://code.google.com/p/android/issues/detail?id=78377#c374

甚至有人声称它修复了它.

Someone even claimed it fixed it.

这篇关于Activity 不会随机呈现,三星只显示白屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆