Everything was fine, but after reinstalling Android Studio there were problems, I don’t know how to fix it. Help me please )

package com.example.turismgeofence; public class MyGeofence { private static final int time = 60000; private int id; private int transitionType; private double latitude; private double longitude; private double radius; public MyGeofence(int id, double lat, double lng, double radius, int type) { this.id = id; this.latitude = lat; this.longitude = lng; this.radius = radius; this.transitionType = type; } public Geofence toGeofence() { return new Geofence.Builder() .setRequestId(String.valueOf(id)) .setTransitionTypes(transitionType) .setCircularRegion(latitude, longitude, radius) .setExpirationDuration(time) .build(); } } 

Here such errors appear

 D:\Android\TurismGeofence\app\src\main\java\com\example\ turismgeofence\MyGeofence.java Error:(26, 12) error: cannot find symbol class Geofence Error:(28, 28) error: package Geofence does not exist Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. 
  • one
    What Geofence class is it in the same package? - Eugene Krivenja
  • @EugeneKrivenja If I understand correctly, then this is a class for working with Google geofences - Alexei Medvedev
  • one
    Exactly, here it is, developers.google.com/android/reference/com/google/android/gms/ ... Then where is the import of this class in the source code? - Eugene Krivenja
  • @EugeneKrivenja The problem is that for some reason it does not allow to import. Here I add the import line com.google.android.gms.location.Geofence; but writes Can't resolve symbol 'Geofence' - Alexey Medvedev
  • Dependencies check in the project, as written here developers.google.com/android/guides/setup In your case should be present com.google.android.gms:play-services-location:11.0.4 - Eugene Krivenja

0