Exception on android java.lang.NoClassDefFoundError: sun.nio.ch.DirectBuffer

Issue #57 resolved
Roy Liao created an issue

Have tried versions :

  • 2.0.4 (excludes jaudiotagger-2.0.4-20111207.115108-15, this is fine.)
  • 2.2.3
TagOptionSingleton.getInstance().setAndroid(true);
AudioFile af = AudioFileIO.read(f); //exception occurred here.
Tag tag = af.getTag(); 

Comments (13)

  1. Eric Snell

    Pull request created. For those that want quick fix on Android only - comment out this line: ((sun.nio.ch.DirectBuffer) bb).cleaner().clean(); MP3File.java line #252 Do this on an Android only version as this quick hack will undo a fix on the Windows side for a memory leak. This should get you running quickly on Android. I've attempted a proper fix contained in the pull request, but that may take time due to code review/testing/build...

  2. franklin_

    Hello.

    I'm trying to use your very awesome library on my Android project, I understand that is not totally compatible but I could added it to my Gradle, and make use of the library, but I don't know how to comment the line thar you point(252), can you explain me how can I do that please?

    Regards.

  3. Log in to comment