开发者

Android import non-built-in type in AIDL

开发者 https://www.devze.com 2023-02-11 14:07 出处:网络
Is there something specific I have to do to import a non-built-in type in an AIDL interface? Specifically MediaPlayer. When I try to import it i get the compile error开发者_StackOverflow社区 \"couldn\

Is there something specific I have to do to import a non-built-in type in an AIDL interface? Specifically MediaPlayer. When I try to import it i get the compile error开发者_StackOverflow社区 "couldn't find import for class android.media.MediaPlayer".


I'm afraid you can't reference android.media.MediaPlayer from an AIDL interface. To include MediaPlayer in an aidl file, it needs to have an associated aidl interface file or it needs to be Parcelable. Neither of these is true.

Could you describe in more detail what you are trying to achieve? There could be a better approach to solve your problem.

0

精彩评论

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