android.widget.MediaController的编译错误 [英] Compilation errors with android.widget.MediaController
问题描述
我正在尝试自定义MediaController.这样做时,我偶然发现了一个问题.我的稍微修改的版本和MediaController的未修改源都无法使用intelliJ IDEA进行编译.编译未修改的源代码时,出现以下错误:
I'm trying to customize the MediaController. While doing so, I've stumbled upon a problem. Both my slightly modified version and the unmodified source of MediaController won't compile with intelliJ IDEA. When compiling the unmodified source code I get these errors:
mWindow = PolicyManager.makeNewWindow(mContext);
给出错误:
cannot find symbol
symbol : variable PolicyManager
location: class android.widget.MediaController
下一个错误:
if (event.getRepeatCount() == 0 && event.isDown() && (
keyCode == KeyEvent.KEYCODE_HEADSETHOOK ||
keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE ||
keyCode == KeyEvent.KEYCODE_SPACE))
给出错误:
Cannot find symbol
symbol : method isDown()
location: android.view.KeyEvent
我修改后的代码还给出了以上错误,但又给出了两个错误:
My modified code also gives the above errors but also two more:
FrameLayout.LayoutParams = new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.FILL_PARENT
);
给出错误:
cannot find symbol
symbol : variable LayoutParams
location: class android.widget.FrameLAyout
下一个错误:
addView(v, frameParams);
给出错误:
cannot find symbol
symbol : variable frameParams
location: class ........
我将非常感谢您的帮助.
I would be most thankful for any help.
I got the source code from GrepCode, http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/2.0_r1/android/widget/MediaController.java/?v=source
推荐答案
MediaController
要求访问不属于Android SDK的类和方法,因此不能将其构建为常规SDK应用程序的一部分.
MediaController
requires access to classes and methods that are not part of the Android SDK, and therefore cannot be built as part of a regular SDK application.
这篇关于android.widget.MediaController的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!