我在我的项目中使用了两个库:holoeverywhere和google maps v2。一切正常,除非我尝试使用库自定义xml-attributes。 从ADT r17开始,我们不再需要使用包名来定义命名空间,而是使用“http://schemas.android.com/apk/res-auto”。 res-auto会自动替换包名称。 例如,如果要在xml
中配置Google地图片段的初始状态<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
class="com.google.android.gms.maps.SupportMapFragment"
map:uiCompass="true"
map:mapType= "normal"
map:uiRotateGestures="true"
map:uiScrollGestures="true"
map:uiTiltGestures="true"
map:uiZoomControls="true"
map:uiZoomGestures="true"/>
我一直收到错误:在'res-auto'包中找不到属性'map'的资源标识符 当我使用 xmlns时会发生同样的事情:holo =“http://schemas.android.com/apk/res-auto” 我无法访问该namepsace的自定义xml属性! 现在我知道你可以以编程方式创建一个地图片段,但我想找到一个解决方案。我错过了什么?此外,我的目标是10-17!
感谢任何帮助。感谢。