2013-05-14 19 views
1

我在我的項目中使用了兩個庫:holoeverywhere和google maps v2。除非我嘗試使用庫自定義xml-attributes,否則一切正常。 由於ADT r17我們不再需要使用包名來定義名稱空間,而是我們使用http://schemas.android.com/apk/res-auto。 res-auto會自動替換爲軟件包名稱。 例如,如果要配置XML中的谷歌地圖片段的初始狀態Android庫項目和自定義xml屬性

<?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-汽車」 屬性「地圖」資源標識符同樣的事情發生時,我使用xmlns:holo =「http://schemas.android.com/apk/res-auto」 我無法訪問namepsace的自定義xml屬性! 現在我知道你可以用編程方式創建一個地圖片段,但我想爲此找到一個解決方案。我錯過了什麼?我也瞄準apis 10-17!

任何幫助表示讚賞。謝謝。

回答