Android 在aidl中传递自定义arraylist(ipc)
我正在尝试在进程间通信中传递自定义arraylist。 我制作了两个像这样的aidl文件 imyaidl接口.aidlAndroid 在aidl中传递自定义arraylist(ipc),android,ipc,aidl,Android,Ipc,Aidl,我正在尝试在进程间通信中传递自定义arraylist。 我制作了两个像这样的aidl文件 imyaidl接口.aidl package com.amaze.DrivePlugin; import com.amaze.DrivePlugin.Layoutelements; // Declare any non-default types here with import statements interface IMyAidlInterface { /** * Demonstra
package com.amaze.DrivePlugin;
import com.amaze.DrivePlugin.Layoutelements;
// Declare any non-default types here with import statements
interface IMyAidlInterface {
/**
* Demonstrates some basic types that you can use as parameters
* and return values in AIDL.
*/
ArrayList<Layoutelements> list(in String driveID);
}
错误为“未知返回类型arraylist”
我还尝试导入arraylist,但是使用java.util.List代替arraylist没有帮助通常可以解决问题你试过用List代替吗?谢谢。顺便说一句,还有什么方法可以抛出异常吗。在AIDL文件中,没有。但是绑定器(实现AIDL生成的存根的java类)可以引发任何异常,最重要的是RemoteException。
package com.amaze.DrivePlugin;
// Declare any non-default types here with import statements
parcelable Layoutelements;