这里没有类似的问题,但谷歌搜索其他人有同样的问题.没有推荐的修复程序正常工作.
完整的错误是:
该文件无效:W/ResourceType(32055):无法在包0中输入0x7f050001(t = 4 e = 1)(错误-75)错误获取'android:icon'属性不是字符串值
这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dominoes"
android:versionCode="10"
android:versionName="2.00">
<application android:icon="@drawable/myicon" android:label="@string/app_name">
<activity android:name=".Dominoes"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="4" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="false" />
</manifest>
Run Code Online (Sandbox Code Playgroud)
图像"myicon.png"位于res/drawable文件夹中.这是96x96 .png.
在我的Android应用程序的一个Activity(SherlockActivity顺便说一句)中,我有一个正常的ListView.
为此ListView,我设置了一个AdapterView.OnItemClickListener通道getListView().setOnItemClickListener(...).
在该监听器中,AlertDialog使用AlertDialog.Builder该类构建,然后向用户显示:
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, final View v, int position, long id) {
AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this);
...
builder.setMessage(Html.fromHtml(...));
builder.show();
}
}
Run Code Online (Sandbox Code Playgroud)
现在,在builder.show()调用时,以下警告始终出现在LogCat中:
W/ResourceType(463): Failure getting entry for 0x010802c9 (t=7 e=713) in package 0 (error -75)
Run Code Online (Sandbox Code Playgroud)
这是从哪里来的?对我而言,似乎这是我无法控制的,因为它出现时builder.show(),所以这个警告可能会在AlertDialog类的源代码中生成.这是真的?
如果没有,我怎样才能找到丢失的资源?如何调试此警告?
编辑:没有相应的条目0x010802c9(或运行时的任何值)R.java,所以我真的不知道如何调试它.