我正在尝试使用jaudiotagger从我最近的副项目的mp3文件中检索id3标签,但我遇到了这个问题..我不能运行程序,因为我收到这个错误,说"MP3AudioHeader不能被解决“..but我已经导入了所需的一切,因为你可以see...any建议将是有帮助的,这是我从网站复制的代码
import org.jaudiotagger.*;
public class mainClass
{
public static void main(String[] args)
{
// the file we are going to read
File oSourceFile = new File("/Users/tushar_chutani/Music/iTunes/iTunes Media/Music/Fun_/We Are Young (feat. Janelle Monáe) - Single/01 We Are Young (feat. Janelle Monáe).mp3");
MP3File f = (Mp3File)AudioFileIO.read(oSourceFile);
MP3AudioHeader audioHeader = f.getAudioHeader();
audioHeader.getTrackLength();
audioHeader.getSampleRateAsNumber();
mp3AudioHeader.getChannels();
mp3AudioHeader.isVariableBitRate();
}发布于 2012-12-26 20:33:22
你的代码是正确的,错误的是,它不是(Mp3File)它的(MP3File) 'p‘应该是大写的。所以正确的是:-
MP3File f = (MP3File)AudioFileIO.read(oSourceFile);https://stackoverflow.com/questions/11835567
复制相似问题