java.lang.noclassdeffounderror: failed resolution of: lcom/google/gson/gson;
Here are a couple of reasons that this could be happening:
a) The library jar file is not being included
b) The wrong version of the jar file is being included
c) (if you are using maven) Another jar file is pulling in a newer/different version of the jar file
d) Your class path does not include the jar file.