mp4parser icon indicating copy to clipboard operation
mp4parser copied to clipboard

java.lang.NoSuchMethodError: No virtual method limit(I)Ljava/nio/ByteBuffer;

Open jtothe4n opened this issue 4 years ago • 6 comments

Seeing this issue on Android:

java.lang.NoSuchMethodError: No virtual method limit(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar) at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:84) at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107) at org.mp4parser.IsoFile.<init>(IsoFile.java:57) at org.mp4parser.IsoFile.<init>(IsoFile.java:52)

Should be similar to: #323 Which was fixed with 0fdd054

Some casts are missing though like in line84

jtothe4n avatar Mar 14 '20 21:03 jtothe4n

I am getting this aswell, any solution ?

Toolenaar avatar Mar 30 '20 12:03 Toolenaar

@sannies https://github.com/sannies/mp4parser/pull/424/commits/d4fabc0eebe782128ac7ba9e511cc87da823faba should fix this.

HBiSoft avatar Aug 31 '20 15:08 HBiSoft

Getting the same problem in version 1.9.41 Next the stacktrace:

java.lang.NoSuchMethodError: No virtual method limit(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar) at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:84) at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107) at org.mp4parser.IsoFile.<init>(IsoFile.java:57) at org.mp4parser.IsoFile.<init>(IsoFile.java:52)

perracodex avatar Mar 05 '21 13:03 perracodex

I wonder why isoparser is aiming for Java 9, as there is no need to do so. After changing for Java 8 in isoparser/pom.xml I could compile for Java 8 and without having these problems

markusstoll avatar Oct 12 '23 10:10 markusstoll

I wonder why isoparser is aiming for Java 9, as there is no need to do so. After changing for Java 8 in isoparser/pom.xml I could compile for Java 8 and without having these problems

please tell me how to change the pom.xml file sir, thank you.

portgasdpetch avatar Dec 15 '23 06:12 portgasdpetch

well its pretty simply: change

complianceLevel, source and target in configuration section to "8"

markusstoll avatar Dec 15 '23 08:12 markusstoll