java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
Asked Answered
S

1

6

When I'm trying to run my application i get this error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;

this com.google.gson.Gson library file that I did added to my project through gradle and also added the libs/gson-2.8.1.jar file through Project Structure and can't understand when I have this problems.

Senate answered 3/6, 2017 at 4:58 Comment(1)
can we see your build.gradle and settings.gradle?Ivelisseivens
K
2

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.

Kancler answered 3/6, 2017 at 5:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.