0
我試圖在Android中獲取我的Google地圖來向我展示我的內容。 Java沒有顯示任何錯誤。XML錯誤/ Android SDK
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tv_location"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
錯誤是表示xmlns
爲片段標籤明顯無效的。有什麼建議麼?
IOW,從您的''元素中刪除'xmlns:android =「http://schemas.android.com/apk/res/android」'。 –
CommonsWare
2013-03-10 00:23:18
@CommonsWare這是修復它,沒有錯誤,但應用程序只是崩潰......回到繪圖板。 – 2013-03-10 00:24:25
@JordanMoffat:使用LogCat查看與崩潰相關的堆棧跟蹤。然後,問一個新的SO問題,如果你仍然無法弄清楚你的困難來源。 – CommonsWare 2013-03-10 00:26:02