Reputation:
I am using Twilio Client Android sdk but failing with this error while try to run it :-
Caused by: java.lang.NoClassDefFoundError: Class "Lcom/twilio/client/impl/useragent/config/UserAgentConfig$Callbacks;" not found
I have include twilioclient-android-1.1.2-3635733.jar what went wrong anyone
What should be the Order- Current Order
Android 4.4.2
Android Private Libraries
Android Dependencies
Project/gen
Project/src
Upvotes: 4
Views: 9944
Reputation: 5543
In case you're using Proguard
i.e, if minifyEnabled
is set to true
in the build.gradle
file, then it is possible that Proguard is obfuscating your code. So make sure you use the Proguard rules for Twillio, as written in the Twilio docs:
-keep class com.twilio.** { *; }
Upvotes: 1
Reputation: 2048
Just check you runtime in 'developer options' -> 'select runtime' if you use ART just change it to Dalvik to avoid this error. Maybe it's not a solution for you but I didn't find another way to fix this error.
Upvotes: 0
Reputation: 21551
Try this:
project-> config build path-> order and export-> move dependent project on top
and
this error is also generated when you make an app that uses the Google API (such as Maps) but run it on a device that targets the Android API.
thats it.
Upvotes: 2