本文介绍了安卓:找不到进口类java.util.ArrayList中的AIDL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有哪些获取用户当前位置的远程服务(这是所有工作的罚款)。我现在希望能够得到用户的当前位置,然后添加到previous位置的列表。这是我的AIDL文件,在那里我有一个问题:

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 previous 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();
}

任何帮助将是非常美联社preciated。谢谢你。

Any help would be much appreciated. Thanks.

推荐答案

(按我的意见,这显然解决了这一问题)

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

使用的java.util.List&LT;地点&gt; 而不是的java.util.ArrayList&LT;地点&gt;

这篇关于安卓:找不到进口类java.util.ArrayList中的AIDL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 10:33
查看更多