未找到资源:RES /绘制/ list_selector_background.xml? [英] Resource not found: res/drawable/list_selector_background.xml?

查看:195
本文介绍了未找到资源:RES /绘制/ list_selector_background.xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发布的我的第一个应用程序。由于只有在SDK模拟器和银河S2测试,有关设备的工作原理上我这里来的反馈意见已经很大。

I recently released my first app. Having only tested in SDK emulator and on a Galaxy S2, the feedback about devices it works on coming to me has been great.

不幸的是,我有一对夫妇的用户向我汇报功能界别。它们之间的共同因素是,它们都是MIUI用户(不同设备这个)。

Unfortunately I've had a couple users report FCs to me. The common factor between them is that they are both MIUI users (different devices IIRC).

一位非常有帮助在提供信息,并尝试建立样解决这个问题,但我似乎无法做它的任何进展。

One has been very helpful in providing info and trying out sample builds to resolve the issue but I just can't seem to make any headway on it.

我在网上搜索相当广泛。虽然我发现患有类似的报告,我有什么可以帮助解决,我可以看到这种特殊情况下。

I've searched online fairly extensively. Although I've found people with similar reports, I've had nothing that helps solve this particular case that I can see.

问题+注意事项:


  • 这个问题似乎是, RES /绘制/ list_selector_background.xml 不存在

  • 我做的名单背景没有自定义的资源,我也不是在我的code使得这一特定资源的任何引用

  • 我使用ActionBarSherlock(的minSdkVersion == 7 targetSdkVersion == 7 项目构建目标== 15

  • 加载preference活动时发生崩溃(这确实有安卓主题=@风格/ Theme.Sherlock.Dialog在清单)

  • 坠毁的通过相同的方法加载另一个preference活动时(首先是活动课的意图)发生

  • the issue seems to be that res/drawable/list_selector_background.xml doesn't exist
  • I've made no custom resources for list backgrounds, nor am I making any reference to this particular resource in my code
  • I'm using ActionBarSherlock (minSdkVersion == 7, targetSdkVersion == 7, project build target == 15)
  • the crash occurs when loading a preference activity (which does have android:theme="@style/Theme.Sherlock.Dialog" in the manifest)
  • the crash does not occur when loading another preference activity via the same method (starting an intent with the activity class)

参考:

  • the original bug report, and
  • their logcat output

这是混淆了我最多的关于这个事情是,当它是一个子我展示这个preference活动特别设置将工作 - < preferenceScreen> 在原来的preferences XML(我分裂了preferences列出除了因为它是更加人性化)。

The thing that confuses me the most about this is that the particular settings I'm displaying in this preference activity would work when it was a sub-<PreferenceScreen> in the original preferences XML (I split the preferences lists apart as it was more user friendly).

编辑:应该指出的是,这是一个空&LT; preferenceScreen&GT; 这被通过code填写;它仍然工作时,它是在一个单一的 preferenceActivity

It should be noted that this is an empty <PreferenceScreen> which gets filled out via code; it still worked when it was in a single PreferenceActivity.

下面是我如何开始preference活动其中工程:

Here's how I'm starting the preference activity which works:

Intent intent = new Intent(this, PreferencesActivity.class);
startActivity(intent);

而这里的我是如何开始的preference活动而失败:

And here's how I'm starting the preference activity which fails:

Intent subredditsIntent = new Intent(MainTabs.this, SubredditPreferencesActivity.class);
startActivity(subredditsIntent);

我刚刚注意到我使用 MainTabs.this 在第二个,可能是由于从嵌套的对话框类复制它;当然这不是原因,因为它从对话框调用以及何时崩溃?

I've just noticed I'm using MainTabs.this in the second one, probably due to copying it from a nested dialog class; surely this is not the cause as it crashes when invoked from the dialog as well?

这似乎仅限于MIUI设备,但我无法证实,与100%的把握。有没有其他人都经历过这个?

This seems to be limited to MIUI devices, but I can't confirm that with 100% certainty. Has anyone else experienced this at all?

任何的想法会更AP preciated!

Any ideas would be much appreciated!

感谢


  • D

推荐答案

我得到了一个最后的把握打造出乐于助人的MIUI用户。我所做的唯一的变化是去掉安卓主题=@风格/ Theme.Sherlock.Dialog从活动定义我的清单。

I managed to get a "last grasp" build out to the helpful MIUI user. The only change I made was to remove android:theme="@style/Theme.Sherlock.Dialog" from the activity definition i the Manifest.

这似乎工作!

有关其他人参考,似乎(在这个时候),使用的对话框主题为preference活动将导致MIUI下的FC。

For reference for other people, it seems (at this time) that using the dialog theme for a preference activity causes FCs under MIUI.

如果通过的onCreate()方法手工设置主题结束了FCing我还没有测试过。

I haven't yet tested if setting the theme manually via the onCreate() method ends up FCing.

希望这可以帮助别人!

这篇关于未找到资源:RES /绘制/ list_selector_background.xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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