问题
I'm currently implementing two Twilio SDKs:
- Programmable Video
- IP Messaging Client
I'm realizing that one dependency affects the other, or at least so I believe, since I first implemented the IP Messaging Client and it worked flawlessly, and now that I've added the dependency for Programmable Video, when I try to run the project, it says it cannot find 3 of the used classes for IP Messaging Client in the package com.twilio.common, but those for Programmable Video are found. Here's part of the gradle (Module):
dependencies {
compile 'com.koushikdutta.ion:ion:2.1.7'
compile 'com.twilio:ip-messaging-android:0.8.1'
compile 'com.twilio:conversations-android:0.12.2'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
}
Also the classes that I have the conflict with of IP Messaging Client (they aren't in the package, the other clases are):
import com.twilio.common.TwilioAccessManager;
import com.twilio.common.TwilioAccessManagerFactory;
import com.twilio.common.TwilioAccessManagerListener;
And the classes of Programmable Video that I'm using:
import com.twilio.common.AccessManager;
import com.twilio.conversations.IncomingInvite;
import com.twilio.conversations.LogLevel;
import com.twilio.conversations.TwilioConversationsClient;
import com.twilio.conversations.TwilioConversationsException;
Note that class AccessManager from Programmable Video is the same and it's at the same level that class TwilioAccessManager used for IP Messaging Client, which in theory work equally. But the other classes can't be found.
I'm hoping anyone can help me! Regards!
回答1:
Twilio Developer Evangelist here.
We had a dependency conflict with com.twilio:ip-messaging-android:0.8.1, but have now fixed that and the fact that they use two different AccessManagers in 0.9.0. this should solve the problem you're encountering.
So please update your gradle file to be:
dependencies {
compile 'com.koushikdutta.ion:ion:2.1.7'
compile 'com.twilio:ip-messaging-android:0.9.0'
compile 'com.twilio:conversations-android:0.12.2'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
}
More information about this update can be found here. Hope this helps you
来源:https://stackoverflow.com/questions/38615118/twilio-android-dependencies-issue