开发者

The import javazoom cannot be resolved

hi all i use the javazoom.jl.player.Player package but it is sa开发者_如何学Goys The import javazoom cannot be resolved. i am using eclipse and doing Android project. i clean the project still the same error is shown. please correct me.


If eclipse can't resolve a package fragment of an import statement, then it tells you (with that error), that there is no library on the classpath that contains a class from that package (or from a package whose name starts with the missing part).

An easy way for standard java/eclipse:

  1. create a folder lib in your projects root directory (with the eclipse workbench!)
  2. copy and paste the jar into that folder
  3. right-click the copied jar and select "add to build path".

This should eliminate the compiler errors immediately.


(Previous part of the answer)

Taking the error message literally, it looks like you have a line of code like that:

import javazoom;

This would be wrong, because we don't import packages but classes from a package. To import all classes from the javazoom package, we'd say:

import javazoom.*;


You should download the .jar of jLayer ( http://www.javazoom.net/javalayer/sources.html )

And add into classpath in the way Andreas_D told you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜