0

I made an app that shows google map correctly , and it runs on my tablet . after unistalling and re-installing the app, the map didn't show anymore :(

Everything is ok, and all the libraries exists,but I can't see the map anymore.

How can I fix it?

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

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

01-28 13:37:15.894: D/AbsListView(21645): onVisibilityChanged() is called, visibility : 8

01-28 13:37:15.894: D/AbsListView(21645): unregisterIRListener() is called

01-28 13:37:15.894: D/AbsListView(21645): onVisibilityChanged() is called, visibility : 8

01-28 13:37:15.894: D/AbsListView(21645): unregisterIRListener() is called

01-28 13:37:15.904: D/AbsListView(21645): onVisibilityChanged() is called, visibility : 0

01-28 13:37:15.904: D/AbsListView(21645): unregisterIRListener() is called

01-28 13:37:16.034: I/System.out(21645): Use GPS provider...

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): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

01-28 13:37:16.054: D/AbsListView(21645): onVisibilityChanged() is called, visibility : 4

01-28 13:37:16.054: D/AbsListView(21645): unregisterIRListener() is called

01-28 13:37:16.064: D/AbsListView(21645): onVisibilityChanged() is called, visibility : 0

01-28 13:37:16.064: D/AbsListView(21645): unregisterIRListener() is called

01-28 13:37:21.074: I/dalvikvm(21645): Total arena pages for JIT: 11

01-28 13:37:21.074: D/dalvikvm(21645): Rejecting registerization due to and-int/lit16 v0,v5, (#128)

01-28 13:37:21.084: I/dalvikvm(21645): Total arena pages for JIT: 12

01-28 13:37:21.084: D/dalvikvm(21645): Rejecting registerization due to and-int/lit16 v0, v5, (#128)

================================================================================ in my cods , evey things is okey,

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);

when , I run my app on eclips, eclips run lins fine, until this line:locationManager.requestLocationUpdates(locationManager.GPS_PROVIDER, 0 , 0 , locationListener); my app sysout : "Use GPS provider..." but after sysout,get null point exception ...The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. I did many things to solved the problem , but unfortunetly , I can't solved it... :(

poursina
  • 87
  • 1
  • 1
  • 11
  • Post your logcat. I assume you've checked it? – RED_ Jan 28 '14 at 10:02
  • the red line in my logs is "01-28 13:37:16.044: E/GooglePlayServicesUtil(21645): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included." – poursina Jan 28 '14 at 10:12
  • I remember having this problem long time ago. Restarting my device solved the problem for me. See if that helps. Also check if you have signed your new apk with a different key. If the key doesn't match, the API won't respond. – Sundeep Jan 28 '14 at 14:49

1 Answers1

0

try adding this to manifest

    <meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />
Deniz
  • 12,332
  • 10
  • 44
  • 62
  • thanks for your answer ,but it is in my Manifest.I can run my app for many times and I used to use app's map , but after reinstall it on my tablet ,the map that exsit on my project , disapeared...and I can't see my app's map any more... – poursina Jan 28 '14 at 11:12
  • is google play services library properly added in you build path? was it working properly? – Deniz Jan 28 '14 at 11:14
  • try this http://stackoverflow.com/questions/18068627/logcat-message-the-google-play-services-resources-were-not-found-check-your-pr or post more details about your issue – Deniz Jan 28 '14 at 11:20