开发者

Android import non-built-in type in AIDL

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜