On Sunday, September 23, 2012 9:38:40 PM UTC+2, Michael Ortiz wrote:
> package com.google.gson; (class, interface, or enum expected)
You shouldn't declare your source code as being in package com.google.gson (unless you want to create patch or whatever). You don't need it and you don't want it. So remove it.
Moreover, you misplaced it. The package declaration must be the very first thing (ignoring comments) in the source file.
> import com.google.gson.Gson; (package com.google.gson does not exist. unused import)
This might be caused by the first error. Or not.
> Why is not working? I have extracted all the libraries from the online 2.2.2 download and added them to the project library that I want to use them in.
> It keeps giving me the errors listed above. Can anyone tell what I'm doing wrong?
No idea, but it doesn't seem to be related to Gson in any way. Have you had success with other libraries? What are you using? In eclipse the only thing needed is to add gson-2.2.2.jar to "Java Build Path / Libraries".