NoClass Found error in Android studio (Lower than 5.0)


After added twitter dependency to the app, app crashes with noClass found error.

compile('') {
        transitive = true;

For lollypop device, it works fine. but for kitkat device & emulator, it crashes with this error.


I’ve using single ActionbarActivity to inflate a Twitter Login button.
If I changed ActionbarActivity to Activity, then it crashes with NoClassDefFoundError:gson.

Another plugin like crashlytics and mopub work fine for kitkat, it only happens for twitter/tweet-composer.

Any way to solve this problem?
I’ve already found several posts from stackoverflow, but it didn’t work for me.


Hi ringsterz,

The twitter artifact has the following dependencies:
– digits
– tweet-ui
– picasso
– support-v4 (android)
– tweet-composer
– twitter-core
– gson
– retrofit

From the error, it seems like your build is missing some dependencies. Have you tried downloading the dependencies again?

./gradlew --refresh-dependencies



Still no luck.
Building a project is fine.
App runs on Lollipop devices without any error. But it still crashes at runtime on kitkat devices(4.2, 4.4).


Hi, I had the same problem and I solved it using proper multiDexEnabled;
You can see the solution here:

or here:


Thanks for help.
After adding a dependency and following line to manifest, problem solved. :smile:

closed #6