Android: could not find import for java.util.ArrayList class in help file

I currently have a remote service that gets the current location of users (it all works fine). Now I want to get the current location of users, and then add the list to previous locations. Here is my helpl file where I have a problem:

import android.location.Location;
import java.util.ArrayList; //error line: couldn't find import for class java.util.ArrayList

interface ILocationService {
    Location getCurrentLocation();
    ArrayList<Location> getAllLocations();
}

Any help would be greatly appreciated. Thank.

+5
source share
1 answer

(According to my comment, which apparently fixed the issue)

Use java.util.List<Location>instead java.util.ArrayList<Location>.

+9
source

All Articles