1

I just updated my Android SDK and my app crashes with:

Could not find class 'com.google.gson.Gson'

Everything was working fine until I did this upgrade. My Gson jar file was external and in the libs directory. I have a feeling that Google decided to include the Gson as part of their SDK update and for some strange reason it won't get found. My PC crashed when updating the SDK, so it's possible that maybe something got corrupted but I have no idea where Gson is stored. After deleting my Gson jar file in the libs directory, it is clear that my app is able to access it via the SDK somehow. But my app will crash if it attempts to execute:

Gson gson = new Gson();

Any idea how I can fix this problem?

Johann
  • 27,536
  • 39
  • 165
  • 279
  • 2
    Please see this http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22 – Mahesh May 30 '13 at 11:51
  • 1
    Wow, thanks a million. It apparently wasn't just Gson but a bunch of stuff, although that one showed up first. Seriously, doesn't Google test their stuff before shipping it?? How on earth can a major bug like that slip through. The solution you pointed me to has over a 100 "likes" which indicates just how serious and rampant this bug is. – Johann May 30 '13 at 12:00

0 Answers0