RTM
RTM copied to clipboard
RTM with java throwing a dependency error
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 :(
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.
It just sound like you have copied sdk conflicted with maven downloaded sdk. can you try below:
- 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
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.
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