SignalR with android(Java) having problem

穿精又带淫゛_ 提交于 2019-12-02 12:11:11

问题


I want to make a realtime-communication between android app and a .net core server project.I tried a question in stackoverflow.

I followed this one. In android side, I used these libraries

    implementation files('libs/signalr-client-sdk-android.jar')
    implementation files('libs/signalr-client-sdk.jar')

After that when try to install app,then it shown this message

Then I added aar file according to this answer.After that when try to build again another error shown,

Failed to resolved:signalr-client-sdk-android-release

After that I added this code into allprojects under repositories

 flatDir { dirs 'libs'} 

Then that error gone and after try to install,another error occurs

Please tell me how to fix this problem or if you know any article that covers realtime-communication between android and .net core.

Update: I changed the signalR library in android side to this one

com.microsoft.signalr:signalr:1.0.0

Now again another error occurs,

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Please tell me how to fix this


回答1:


It's looks like the links you referenced are a little out of date. They are for the depricated client that only works for classic ASP.NET. The SignalR team recently released a Java client for ASP.NET Core SignalR. Here are the getting started docs https://docs.microsoft.com/en-us/aspnet/core/signalr/java-client?view=aspnetcore-2.2

if you know any article that covers realtime-communication between android and .net core.

The doc I linked above is exactly that! Hope this helps!



来源:https://stackoverflow.com/questions/54675905/signalr-with-androidjava-having-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!