我创建了一个叫做“PechhulpActivity”和 谷歌地图的活动(安卓)我想放置一个按钮,在它。但是如果我想编辑的活动它给我的错误有关片段标签:为什么我不能把小部件在我的活动?
A <fragment> tag allows a layout file to dynamically include different
layouts at runtime. At layout editing time the specific layout to be
used is not known. You can choose which layout you would like previewed
while editing the layout.
这里是我的布局文件夹结构的截图,起初我还以为我失踪了一样content_pechhulp.xml的文件。如果是这样,我如何创建正确的?我希望像定制的信息窗口的谷歌地图的活动,我想它里面等一个按钮,我希望你们能帮助我。
编辑:(activity_pechhulp.xml)
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.doppler.stackingcoder.pechhulp.PechhulpActivity" />
你能提供你的XML? – faruk
@AlZill是看到编辑 – Stackingcoder
可能重复http://stackoverflow.com/questions/23898992/android-studio-google-map-v2-fragment-rendering – X3Btel