How To Resolve Java.lang.noclassdeffounderror Useragentconfig$callbacks With Twilio
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/
Solution 1:
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.
Solution 2:
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 classcom.twilio.** { *; }
Solution 3:
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.
Post a Comment for "How To Resolve Java.lang.noclassdeffounderror Useragentconfig$callbacks With Twilio"