Open shixl opened 7 years ago
I don't see any evidence of this library anywhere in your stack trace. Are you using a fork?
I do not see any compile version I can use. before I use compile 'com.github.NaikSoftware:StompProtocolAndroid:1.1.1' compile 'org.java-websocket:Java-WebSocket:1.3.0' but now is error
FATAL EXCEPTION: Thread-6924 Process: com.siheal.smartphone, PID: 18804 java.lang.NoSuchMethodError: No static method ua_naiksoftware_stomp_client_StompClient$$Lambda$1_lambda$connect$0(Lua/naiksoftware/stomp/client/StompClient;Ljava/util/List;Lua/naiksoftware/stomp/LifecycleEvent;)V in class Lua/naiksoftware/stomp/client/StompClient; or its super classes (declaration of 'ua.naiksoftware.stomp.client.StompClient' appears in /data/app/com.siheal.smartphone-1/base.apk) at ua.naiksoftware.stomp.client.StompClient$$Lambda$1.accept(Unknown Source) at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:61) at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onNext(FlowableDoOnLifecycle.java:79) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:521) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onNext(FlowableCreate.java:445) at ua.naiksoftware.stomp.WebSocketsConnectionProvider.emitLifecycleEvent(WebSocketsConnectionProvider.java:153) at ua.naiksoftware.stomp.WebSocketsConnectionProvider.access$200(WebSocketsConnectionProvider.java:30) at ua.naiksoftware.stomp.WebSocketsConnectionProvider$1.onOpen(WebSocketsConnectionProvider.java:98) at org.java_websocket.client.WebSocketClient.onWebsocketOpen(WebSocketClient.java:311) at org.java_websocket.WebSocketImpl.open(WebSocketImpl.java:720) at org.java_websocket.WebSocketImpl.decodeHandshake(WebSocketImpl.java:301) at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:173) at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:229) at java.lang.Thread.run(Thread.java:818)
Ah, that's better! That new stack trace actually includes this software in it.
At first glance, this is looking like a build issue with the APK. What toolchain, Android version, Java version, etc are you using?
android studio 2.3 gradle3.3 java 1.8
compile 'io.reactivex.rxjava2:rxandroid:2.0.1' compile 'io.reactivex.rxjava2:rxjava:2.0.4' compile 'com.squareup.retrofit2:retrofit:2.2.0' compile 'com.squareup.retrofit2:adapter-rxjava2:2.2.0' compile 'org.java-websocket:Java-WebSocket:1.3.4' compile 'com.squareup.okhttp3:okhttp:3.8.0'
and use StompProtocolAndroid Example lib import my moudle
How are you using Java 8 without Android Studio 3+? Jack or Retrolambda?
@forresthopkinsa I was getting similar error as
java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar)
at ua.naiksoftware.stomp.StompClient.<init>(StompClient.java:58)
...
After your comment simply went to module settings and set target to java 1.8
Or in your build.gradle
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
@shixl hope this helps (or someone else who stumble upon this)
java.lang.NoSuchMethodError: No static method com_siheal_smartphone_commonlib_stom_client_StompClient$$Lambda$1_lambda$connect$0(Lcom/siheal/smartphone/commonlib/stom/client/StompClient;Ljava/util/List;Lcom/siheal/smartphone/commonlib/stom/LifecycleEvent;)V in class Lcom/siheal/smartphone/commonlib/stom/client/StompClient; or its super classes (declaration of 'com.siheal.smartphone.commonlib.stom.client.StompClient' appears in /data/app/com.siheal.smartphone-1/base.apk) at com.siheal.smartphone.commonlib.stom.client.StompClient$$Lambda$1.accept(Unknown Source) at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:62) at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onNext(FlowableDoOnLifecycle.java:79) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:542) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onNext(FlowableCreate.java:466) at com.siheal.smartphone.commonlib.stom.WebSocketsConnectionProvider.emitLifecycleEvent(WebSocketsConnectionProvider.java:153) at com.siheal.smartphone.commonlib.stom.WebSocketsConnectionProvider.access$200(WebSocketsConnectionProvider.java:30) at com.siheal.smartphone.commonlib.stom.WebSocketsConnectionProvider$1.onOpen(WebSocketsConnectionProvider.java:98) at org.java_websocket.client.WebSocketClient.onWebsocketOpen(WebSocketClient.java:311) at org.java_websocket.WebSocketImpl.open(WebSocketImpl.java:720) at org.java_websocket.WebSocketImpl.decodeHandshake(WebSocketImpl.java:301) at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:173) at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:229) at java.lang.Thread.run(Thread.java:761)