我再也看不到我的地图了

时间:2014-01-28 10:01:08

标签: android google-maps

我制作了一款可以正确显示谷歌地图的应用,它可以在我的平板电脑上运行。在取消并重新安装应用程序后,地图不再显示:(

一切都很好,所有的库都存在,但我再也看不到地图了。

我该如何解决?

  

01-28 13:37:15.614:I / System.out(21645):MainTabsActivity

01-28 13:37:15.894:D / AbsListView(21645):获取MotionRecognitionManager

01-28 13:37:15.894:D / AbsListView(21645):调用onVisibilityChanged(),可见性:8

01-28 13:37:15.894:D / AbsListView(21645):调用unregisterIRListener()

01-28 13:37:15.894:D / AbsListView(21645):调用onVisibilityChanged(),可见性:8

01-28 13:37:15.894:D / AbsListView(21645):调用unregisterIRListener()

01-28 13:37:15.904:D / AbsListView(21645):调用onVisibilityChanged(),可见性:0

01-28 13:37:15.904:D / AbsListView(21645):调用unregisterIRListener()

01-28 13:37:16.034:I / System.out(21645):使用GPS提供商......

01-28 13:37:16.034:I / System.out(21645):Exception.getMessage = null

01-28 13:37:16.034:I / System.out(21645):sale:onCreate

01-28 13:37:16.044:I / System.out(21645):disablePay

01-28 13:37:16.044:E / GooglePlayServicesUtil(21645):Google Play服务资源 没找到。检查项目配置以确保包含资源。

01-28 13:37:16.054:D / AbsListView(21645):调用onVisibilityChanged(),可见性:4

01-28 13:37:16.054:D / AbsListView(21645):调用unregisterIRListener()

01-28 13:37:16.064:D / AbsListView(21645):调用onVisibilityChanged(),可见性:0

01-28 13:37:16.064:D / AbsListView(21645):调用unregisterIRListener()

01-28 13:37:21.074:I / dalvikvm(21645):JIT的竞技场总页数:11

01-28 13:37:21.074:D / dalvikvm(21645):由于and-int / lit16 v0,v5,(#128)而拒绝注册

01-28 13:37:21.084:I / dalvikvm(21645):JIT的竞技场总页数:12

01-28 13:37:21.084:D / dalvikvm(21645):由于and-int / lit16 v0,v5,(#128)而拒绝注册

=============================================== ================================= 在我的鳕鱼中,evey的事情很好,

android.location.LocationListener locationListener = new MyLocationListener();
    locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);



    boolean isGPSEnabled = locationManager.isProviderEnabled(locationManager.GPS_PROVIDER);
    boolean isNetworkEnabled = locationManager.isProviderEnabled(locationManager.NETWORK_PROVIDER);
    try {
        if(isGPSEnabled){
            System.out.println("Use GPS provider...");
            locationManager.requestLocationUpdates(locationManager.GPS_PROVIDER, 0 , 0 , locationListener);
            location=locationManager.getLastKnownLocation(locationManager.GPS_PROVIDER);
        }else if(isNetworkEnabled){
            System.out.println("Use network provider...");
            locationManager.requestLocationUpdates(locationManager.NETWORK_PROVIDER, 0 , 0 , locationListener);
            location=locationManager.getLastKnownLocation(locationManager.NETWORK_PROVIDER);
        }

        myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 17));
    } catch (Exception e) {
        System.out.println("Exception.getMessage = "+e.getMessage());
    }

    myMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
    myMap.setMyLocationEnabled(true);

当我在eclips上运行我的应用程序时,eclips运行lins很好,直到这一行:locationManager.requestLocationUpdates(locationManager.GPS_PROVIDER, 0 , 0 , locationListener); 我的app sysout:“使用GPS提供商...” 但在sysout之后,获取零点异常... The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 我做了很多事来解决问题,但不幸的是,我无法解决它...... :(

1 个答案:

答案 0 :(得分:0)

尝试将此添加到清单

    <meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />