0

我有这个 xml 文件:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ctc="http://schemas.android.com/apk/res/com.hulist.asm.person"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

    <com.hulist.asm.person.ImageMap
        android:id="@+id/map"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/person"
        ctc:map="person_map" />    
</LinearLayout>

在第 8 行 ( <com.hulist.asm.person.ImageMap) 有一个错误说

错误:在包“com.hulist.asm.person”中找不到属性“map”的资源标识符

我这几天一直在尝试解决这个问题,我哪里错了?

4

2 回答 2

0

如果您当前的包名称是com.hulist.asm,那么这就是ctc命名空间声明应该包含的内容,而不是

xmlns:ctc="http://schemas.android.com/apk/res/com.hulist.asm.person"
于 2013-01-05T17:58:36.183 回答
0

您可能指的是错误 9656中已解决的相同场景。看一下,如果相同,请检查您是否使用的是旧版本的 sdk 工具。

于 2013-01-05T17:48:21.630 回答