Home Unable to set path in jaudiotagger
Reply: 0

Unable to set path in jaudiotagger

user1592
1#
user1592 Published in July 23, 2018, 1:28 pm

I'm trying to edit tags of audio files and for that I'm using JaudioTagger. But a problem exists and I can't figure it out.

I'm getting this error:

java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)

And my code for getting tags of audio files :

            File path = new File(songInfoModel.getData());
            Log.e("Path: ", path.toString());
            try {
                AudioFile f = AudioFileIO.read(path);
                Tag tag = f.getTag();
                String artist = tag.getFirst(FieldKey.ARTIST);
                tag.getFirst(FieldKey.ALBUM);
                tag.getFirst(FieldKey.TITLE);
                tag.getFirst(FieldKey.COMMENT);
                tag.getFirst(FieldKey.YEAR);
                tag.getFirst(FieldKey.TRACK);
                tag.getFirst(FieldKey.DISC_NO);
                tag.getFirst(FieldKey.COMPOSER);
                tag.getFirst(FieldKey.ARTIST_SORT);

                Log.e("Artist: ",artist);
            } catch (CannotReadException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (TagException e) {
                e.printStackTrace();
            } catch (ReadOnlyFileException e) {
                e.printStackTrace();
            } catch (InvalidAudioFrameException e) {
                e.printStackTrace();
            }
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324588 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO