我有一个mediaplayer
类,其中包含所有方法。我只是想知道文件何时完成播放,但我遇到了麻烦。
这是方法:
public boolean isPlaying()
{
final boolean still_playing = true;
mediaplayer.setOnCompletionListener(new OnCompletionListener()
{
@Override
public void onCompletion(MediaPlayer mp)
{
still_playing = false;
}
});
return still_playing;
}
我收到the final local variable cannot be assigned, since it is defined in an enclosing type
之类的错误,或者当我尝试其他不同的内容时,我得到了variabledeclaratorIdexpected
干杯