开发者

Android: Couldn't find import for class java.util.ArrayList in aidl file

I currently have a remote service which gets the users current location (this is all working fine). I now want to be able to get the users current location then add a to a list of prev开发者_JAVA百科ious locations. Here is my aidl file, where i'm having 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 much appreciated. Thanks.


(As per my comment, which apparently fixed the problem)

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜