Android库项目和自定义xml属性

Android库项目和自定义xml属性,android,xml-attribute,library-project,Android,Xml Attribute,Library Project,我在我的项目中使用了两个库:holoeverywhere和GoogleMapsV2。除了尝试使用库自定义xml属性外,其他一切都正常工作。 由于ADT r17,我们不再需要使用包名来定义名称空间,而是使用“”。res auto自动替换为包名。 例如,如果要在xml中配置google地图片段的初始状态 <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com

我在我的项目中使用了两个库:holoeverywhere和GoogleMapsV2。除了尝试使用库自定义xml属性外,其他一切都正常工作。 由于ADT r17,我们不再需要使用包名来定义名称空间,而是使用”。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“ 我无法访问该名称的自定义xml属性! 现在我知道你可以通过编程创建一个地图片段,但我想找到一个解决方案。我错过了什么?而且我的目标是API 10-17


感谢您的帮助。谢谢。

至少对于MapsV2,您可能会在Eclipse工具中遇到

至少对于mapsv2,您可能会在Eclipse工具中遇到