RTM icon indicating copy to clipboard operation
RTM copied to clipboard

RTM with java throwing a dependency error

Open raysandeep opened this issue 4 years ago • 4 comments

Cannot resolve io.agora.rtm:agora-rtm-sdk:1.0

I've been trying to run code. I'm getting a dependency error. I checked out the maven and tried the 1.4.0 version as well. But didn't work :(

raysandeep avatar Sep 16 '20 21:09 raysandeep

After debugging for a while. I sorted the above issue. When I'm trying to run I'm getting a new error.

java.lang.NoClassDefFoundError: Could not initialize class io.agora.common.AgoraServiceJNI io.agora.common.Logging.log(Logging.java:26) io.agora.common.Logging.i(Logging.java:50) io.agora.rtm.internal.RtmClientImpl.initRtmService(RtmClientImpl.java:115) io.agora.rtm.internal.RtmClientImpl.(RtmClientImpl.java:100) io.agora.rtm.internal.RtmManager.createRtmInstance(RtmManager.java:11) io.agora.rtm.RtmClient.createInstance(RtmClient.java:60)

raysandeep avatar Sep 17 '20 02:09 raysandeep

It just sound like you have copied sdk conflicted with maven downloaded sdk. can you try below:

  1. make sure below two folders clean up: /app/libs, /app/src/main/jniLibs 2.add implementation 'io.agora.rtm:rtm-sdk:1.4.0' in /app/build.gradle 3.Menu -> Project -> rebuild

yoreland avatar Sep 22 '20 07:09 yoreland

Why didn't the owners add the jars to maven repository? This seems like a bad practice to copy a jar from the web. How will we know that a new version is out? This is very ad-hoc.

Invertisment avatar Mar 20 '21 12:03 Invertisment

There is a library file along with this jar package libagora_rtm_sdk.so

run: sudo cp libagora_rtm_sdk.so /usr/lib/; sudo ldconfig

DanielCheng avatar Mar 02 '23 09:03 DanielCheng