i need a help with using Gson library. I made a build path and imported it into my class, but when i initialize the Gson object i get an NoClassDefFoundError. I also tryed to download some other versions but didnt helped. Now using 2.2.4. Thanks in advance!
            Asked
            
        
        
            Active
            
        
            Viewed 196 times
        
    0
            
            
        - 
                    Are you using AndroidStudio? – Prettygeek Nov 15 '13 at 10:49
- 
                    Make sure you add external jar like [this](http://stackoverflow.com/questions/1334802/how-can-i-use-external-jars-in-an-android-project?lq=1) – einverne Nov 15 '13 at 11:07
- 
                    i did but it dont work... – pavle Nov 15 '13 at 13:14
3 Answers
1
            Try this
- Right click on project
- Properties
- Java Build Path
- Order And Export
- Check all dependencies
- Clean and Build
- Now Run your project

 
    
    
        einverne
        
- 6,454
- 6
- 45
- 91
 
    
    
        Biraj Zalavadia
        
- 28,348
- 10
- 61
- 77
0
            
            
        Here is a guide that could help you. Its explains how to setup and use GSON.
 
    
    
        MungoRae
        
- 1,912
- 1
- 16
- 25
0
            
            
        To add support of GSON on android studio, just add line below to app build.gradle file.
compile 'com.google.code.gson:gson:2.7'
By now 2.7 is last current available version according to: https://mvnrepository.com/artifact/com.google.code.gson/gson
Please check this repository to be sure you are using last available version.
 
    
    
        Juan Pablo
        
- 1,213
- 10
- 15
