我試圖在進程間通信中傳遞一個自定義數組列表。 我做了兩個AIDL文件,這樣在aidl中傳遞自定義數組列表(ipc)
IMyAidlInterface.aidl
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);
}
這裏Layoutelements是實現parcelable
Layoutelements.aidl自定義類
package com.amaze.DrivePlugin;
// Declare any non-default types here with import statements
parcelable Layoutelements;
錯誤說「未知的返回類型數組列表」。
我也試圖導入的ArrayList但didnt幫助
您是否嘗試過使用列表,而不是什麼問題? –