Calligraphy icon indicating copy to clipboard operation
Calligraphy copied to clipboard

NoClassDefFoundError

Open PGMacDesign opened this issue 9 years ago • 5 comments

Good day, I just upgraded Android Studio to 2.0. It also updated my Gradle file to 2.0 as well. Since the update, whenever I open my app, it pops up with a NoClassDefFoundError. Here is a link to the logcat output. https://gist.github.com/PGMacDesign/a076f4b3e4ed8a6f45f9d8b779651580

Also, I added Fabric (Crashlytics) this morning as well in case that helps narrow down the problem.

Steps I have taken to try to fix the problem:

  1. Invalidate restart
  2. Updated to the newest (2.2) version

Any ideas?

-PGMacDesign

PGMacDesign avatar Apr 15 '16 19:04 PGMacDesign

Looks like an Android Studio 2.0 issue (Not that this is surprising). http://stackoverflow.com/questions/36549135/android-studio-2-0-gradle-error-noclassdeffounderror-could-not-initialize-clas There is more info, but for now, stay away from Android 2.0. Still a pain to deal with.

PGMacDesign avatar Apr 15 '16 20:04 PGMacDesign

Looks like that was not the fix. Downgraded back to 1.5.1 and it is still force closing with the same NoClassDefFoundError.

PGMacDesign avatar Apr 15 '16 23:04 PGMacDesign

I've had this before, it's not Calligraphy, from memory it's either a multidex issue or a build tools issue. I can't quite remember how I fixed it.

chrisjenx avatar Apr 19 '16 23:04 chrisjenx

Yup looks like Multidex see: #224

chrisjenx avatar Apr 19 '16 23:04 chrisjenx

EDIT: Nevermind, I AM using multidex, but it was improperly configured so it didn't work on Android 4. Please ignore my derpiness below.

I'm not using Multidex. Facing this issue on a Samsung S3 (Android 4.1.2) and a Moto G 1st Gen (Android 4.4.4). Works fine on my Nexus 5 and Samsung S4 though.

Build tools 23.0.3, using Android Studio 2.1.1. Anyone else facing this problem?

I've also noticed the following line in logcat:

06-06 17:55:29.438 W/dalvikvm: VFY: unable to resolve static field 44999 (fontPath) in Luk/co/chrisjenx/calligraphy/R$attr;

squeeish avatar Jun 06 '16 10:06 squeeish