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.
精彩评论