java.lang.NoSuchMethodError: No virtual method clear()Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of ‘java.nio.ByteBuffer’ appears in /Users/gtc/.moe/moe-sdk-1.8.1/sdk/moe-core.dex)
if i run with old version 1.7.3, my app run not error
My project is used libgdx 1.10.0…now version libgdx not support ios-moe, but i mod it (i copy old code “gdx-backend-moe” of 1.9.11 and replace libs ‘moe-core.jar, moe-ios.jar’ old with ‘moe-core.jar, moe-ios.jar’ of v1.8.2)… for build ios using xcode. In thi project i use source code netty for connect tcp nettwork with server.
When i call function connect to my server, this error will be display on xcode
with moe version .18.1 java.lang.NoSuchMethodError: No virtual method clear()Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of ‘java.nio.ByteBuffer’ appears in /Users/gtc/.moe/moe-sdk-1.8.1/sdk/moe-core.dex)
with moe version 1.8.2 art W 7442 92533 /Users/noisyfox/Documents/projects/moe/moe-art/aosp/art/runtime/thread_list.cc:820] No such thread id for suspend: 49 art W 7442 92560 /Users/noisyfox/Documents/projects/moe/moe-art/aosp/art/runtime/thread_list.cc:820] No such thread id for suspend: 39
with moe version 1.7.3 don’t have this error…and now i use this version for build app
Which Java version do you use for compiling? Maybe 16? The signature of ByteBuffer.clear is different in Java 16 than in Java 7/8(and the signature in your crash looks like the Java 16 signature). @Mr_John
java.lang.NoSuchMethodError: No virtual method clear()Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of ‘java.nio.ByteBuffer’ appears in /Users/duchien/.moe/moe-sdk-1.8.2/sdk/moe-core.dex)
at h.n.d.gtc.client.app.network.io.netty.buffer.PooledHeapByteBuf.setBytes(PooledHeapByteBuf.java:261)
at h.n.d.gtc.client.app.network.io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1094)
at h.n.d.gtc.client.app.network.io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:367)
at h.n.d.gtc.client.app.network.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at h.n.d.gtc.client.app.network.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
at h.n.d.gtc.client.app.network.io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:544)
at h.n.d.gtc.client.app.network.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
at h.n.d.gtc.client.app.network.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
at h.n.d.gtc.client.app.network.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at h.n.d.gtc.client.app.network.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)