小编use*_*ser的帖子

元数据标记没有正确的值

我是android的新手,我试图在我的应用程序中使用谷歌地图使用谷歌播放服务获取错误.

MapViewActivty:

public class MapsViewActivity extends FragmentActivity {
// Google Map
private GoogleMap googleMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.maps);

    try {
        // Loading map
        initilizeMap();

    } catch (Exception e) {
        e.printStackTrace();
    }

}

/**
 * function to load map. If map is not created it will create it for you
 * */
private void initilizeMap() {
    if (googleMap == null) {
        googleMap = ((MapFragment) getFragmentManager().findFragmentById(
                R.id.map)).getMap();

        // check if map is created successfully or not
        if (googleMap …
Run Code Online (Sandbox Code Playgroud)

xml android google-maps fragment

6
推荐指数
1
解决办法
9391
查看次数

标签 统计

android ×1

fragment ×1

google-maps ×1

xml ×1