我已遵循此处的所有指示,没有任何问题:
https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2 https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2
最后,我按照最后一条指令测试地图是否正常工作,并使用以下内容更新我的 Activity_map.xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<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:name="com.google.android.gms.maps.MapFragment"/>
然而,在最后一行中,后面的所有内容com.google
是红色的,当鼠标悬停在上面时,我收到消息“无法解析符号‘MapFragment’。
现在任何想法都会有很大帮助。
请执行以下操作来解决该问题:
最后:点击"+" button
之后,清理并重建项目!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)