Search code examples
androidandroid-geofence

GeofencingRequest cannot be resolved to a type


I'm trying to develop a simple Android app that request the creation of a geofence to Google Play Services and does stuff when a transition occurs.

My problem arises when I want to create

GeofencingRequest mGeofencingRequest=new GeofencingRequest.Builder()
.build();

since Eclipse warns me that:

GeofencingRequest cannot be resolved to be a type.

I need this object to use addGeofences.

All other imports and interfaces work just fine (already tested).

  1. I've update today Google Play Service with Android SDK Manager;
  2. I've included Google_play_services as library to my project;
  3. Android Project Build Target is on Android 5.0.1;
  4. My AndroidManifest ha the meta-data field edited to use Google Play Services;

Any help would be highly appreciate.


Solution

  • I've finally figured out what was the problem and how to solve.

    The copy of Google Play Service Lib in my workspace wasn't update to the last version, although Android SDK Mangager said otherwise.

    Anyway,

    • I've just erased google_play_service from Eclipse IDE and from the workgroup folder where it was;
    • I've imported a brand new google_play_service_lib from the SDK folder of Eclipse.
    • Adding again the google_play_service_lib to my project solved the problem.