Android 不能';t检索图形布局
这是我的activity_main.xml。 当我尝试切换到图形视图时,它说从“片段布局”菜单中选择一个片段 另外,按钮和微调器都不会出现在我的布局中Android 不能';t检索图形布局,android,xml,eclipse,android-layout,android-fragments,Android,Xml,Eclipse,Android Layout,Android Fragments,这是我的activity_main.xml。 当我尝试切换到图形视图时,它说从“片段布局”菜单中选择一个片段 另外,按钮和微调器都不会出现在我的布局中 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:l
<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" >
<Spinner
android:id="@+id/spr_place_type"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_alignParentTop="true" />
<Button
android:id="@+id/btn_find"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/spr_place_type"
android:text="@string/str_btn_find" />
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/spr_place_type"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
我以前贴过这篇文章,但还不能解决这个问题…有人能帮我解决这个问题吗 我就这样试过了,所有的项目都显示得很好。试一下,然后根据您的需要进行设置
<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" >
<Button
android:id="@+id/btn_find"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:text="@string/str_btn_find" />
<Spinner
android:id="@+id/spr_place_type"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/btn_find" />
<fragment
android:id="@+id/map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/spr_place_type"
android:layout_marginTop="19dp"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
我认为预览谷歌地图根本不可能。你为什么不试着运行它来实时查看呢?我试过你的代码,它运行得很好…;)。。。cudnt??rilly???@FrankN.Stein意思是不能…:P