sannies / mp4parser

A Java API to read, write and create MP4 files
Apache License 2.0
2.74k stars 563 forks source link

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

Open jtothe4n opened 4 years ago

jtothe4n commented 4 years ago

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

Toolenaar commented 4 years ago

I am getting this aswell, any solution ?

HBiSoft commented 3 years ago

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

perracodex commented 3 years ago

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)

markusstoll commented 9 months ago

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

portgasdpetch commented 7 months ago

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.

markusstoll commented 7 months ago

well its pretty simply: change

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