gpt4 book ai didi

android - ResourceType 资源条目索引超出类型 entryCount

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:50:54 26 4
gpt4 key购买 nike

我使用 Android Studio 3.2。当我清理/重建项目时,我在 build 工具窗口中看到这些警告:

W/ResourceType( 6139): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1155)
W/ResourceType( 6139): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1155)
W/ResourceType( 6139): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1155)
W/ResourceType( 6139): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1155)

如您所见,没有要 check out 的任何文件的地址。我也尝试谷歌并看到 thisthis问题,但我找不到任何可以帮助我的东西。我该如何解决这个问题?

最佳答案

为了更好地理解您的问题,请使用您编译的 APK。其中,有一个名为“resources.arsc”的文件。这是压缩和编译的资源文件。为了能够阅读它运行:

aapt dump --values resources myAPK.apk > c:\my-res.txt 

现在您将拥有一个文本文件,其中包含您应用中所有资源的描述。其中,有很多段看起来像这样:

type 3 configCount=2 entryCount=5
spec resource 0x7f040000 com.LTS.NVMS7000:bool/abc_action_bar_embed_tabs: flags=0x00000080
spec resource 0x7f040001 com.LTS.NVMS7000:bool/abc_allow_stacked_button_bar: flags=0x00000000
spec resource 0x7f040002 com.LTS.NVMS7000:bool/abc_config_actionMenuItemAllCaps: flags=0x00000000
spec resource 0x7f040003 com.LTS.NVMS7000:bool/abc_config_closeDialogWhenTouchOutside: flags=0x00000000
spec resource 0x7f040004 com.LTS.NVMS7000:bool/abc_config_showMenuShortcutsWhenKeyboardPresent: flags=0x00000000
config (default):
resource 0x7f040000 com.LTS.NVMS7000:bool/abc_action_bar_embed_tabs: t=0x12 d=0xffffffff (s=0x0008 r=0x00)
(color) #ffffffff
resource 0x7f040001 com.LTS.NVMS7000:bool/abc_allow_stacked_button_bar: t=0x12 d=0x00000000 (s=0x0008 r=0x00)
(color) #00000000
resource 0x7f040002 com.LTS.NVMS7000:bool/abc_config_actionMenuItemAllCaps: t=0x12 d=0xffffffff (s=0x0008 r=0x00)
(color) #ffffffff
resource 0x7f040003 com.LTS.NVMS7000:bool/abc_config_closeDialogWhenTouchOutside: t=0x12 d=0xffffffff (s=0x0008 r=0x00)
(color) #ffffffff
resource 0x7f040004 com.LTS.NVMS7000:bool/abc_config_showMenuShortcutsWhenKeyboardPresent: t=0x12 d=0x00000000 (s=0x0008 r=0x00)
(color) #00000000
config port:
resource 0x7f040000 com.LTS.NVMS7000:bool/abc_action_bar_embed_tabs: t=0x12 d=0x00000000 (s=0x0008 r=0x00)
(color) #00000000

在此部分中,您可以看到预期有 2 个配置和 5 个条目。您应该做的是查看例如:

resource 0x0101053d

这会出现在您的日志中,并查看该部分中的位置。它应该会提示您应用中的哪个资源组导致了它。我猜你正在链接一个非常旧的包,因此编译器没有将该包的资源正确链接到你的应用程序,因为它们适用于不同的 Android SDK 版本。很抱歉,我不能提供更多帮助。

如果您有更多信息,请对此答案发表评论,我会尽力提供帮助。

关于android - ResourceType 资源条目索引超出类型 entryCount,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52809946/

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