Closed baruchn closed 6 years ago
Hello @baruchn,
thank you for opening this issue and inform me about the changes for gradle.
I think the problem is, that this library was never designed to separate between API
and implementation
and therefore I expected that the lib just wokrs with implementation
.
Anyway I will take a look into this and maybe work out a better solution!
Greetings marci4
No real solution found. Compile will still exist.
Closing this issue, exact info will be removed anyway with 1.4.0.
Changing
compile 'org.java-websocket:Java-WebSocket:1.3.8'
toapi 'org.java-websocket:Java-WebSocket:1.3.8'
causes applications using my library to crush withjava.lang.NoClassDefFoundError
when trying to instantiate the class which extendsWebSocketClient
.As of Gradle 3.0
compile
configuration is deprecated and I can't keep using it. According to the documentationapi
should be it's equivalent in new versions.Also tried using
implementation 'org.java-websocket:Java-WebSocket:1.3.8'
but got the same result.There is a workaround: Adding
implementation 'org.java-websocket:Java-WebSocket:1.3.8'
in all the application using the library.Expected Behavior
Open websocket.
Current Behavior
java.lang.NoClassDefFoundError
when trying to instantiate the class which extendsWebSocketClient
.Possible Solution
Steps to Reproduce (for bugs)
api 'org.java-websocket:Java-WebSocket:1.3.8'
.implementation 'com.your.library'
Debug log (for bugs)
Note: me.oriient.ipssdk.ips.WebSocket extends WebSocketClient.
java.lang.NoClassDefFoundError: me.oriient.ipssdk.ips.WebSocket at me.oriient.ipssdk.ips.WebSocketFactory.getSocket(WebSocketFactory.java:32) at me.oriient.ipssdk.ips.SocketWrapper.(SocketWrapper.java:38)
at me.oriient.ipssdk.ips.ServerSession.createNewSocket(ServerSession.java:226)
at me.oriient.ipssdk.ips.ServerSession.doOpen(ServerSession.java:216)
at me.oriient.ipssdk.ips.ServerSession.open(ServerSession.java:212)
at me.oriient.ipssdk.ips.CoreLogic.doLogin(CoreLogic.java:264)
at me.oriient.ipssdk.ips.CoreLogic.login(CoreLogic.java:255)
at me.oriient.ipssdk.ips.Core.login(Core.java:75)
at me.oriient.ipssdk.ips.IPSCore.login(IPSCore.java:105)
at me.oriient.ipsdemo.activities.LoginActivity.doLogin(LoginActivity.java:130)
at me.oriient.ipsdemo.activities.LoginActivity.access$700(LoginActivity.java:36)
at me.oriient.ipsdemo.activities.LoginActivity$5.onClick(LoginActivity.java:189)
at android.view.View.performClick(View.java:5697)
at android.widget.TextView.performClick(TextView.java:10813)
at android.view.View$PerformClick.run(View.java:22526)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Context
## Your Environment