GSon + @Expose annotation

153 views
Skip to first unread message

gustavo....@gmail.com

unread,
Jun 2, 2014, 12:56:02 PM6/2/14
to j2objc-...@googlegroups.com
Good day,

I am trying to translate a class with @Expose annotations

import com.google.gson.annotations.Expose;

But I am getting the next error message:

"Expose cannot be resolved to a type"

Does j2objc support this translation process?

Thanks

Thomas Ball

unread,
Jun 3, 2014, 5:57:30 PM6/3/14
to j2objc-...@googlegroups.com
Yes, you need to either include the gson.jar file on the classpath, the gson-sources.jar (or a similar name) or the gson root source directory on the sourcepath. That's because j2objc starts with Java compilation, and the compiler needs to be able to resolve all references. You would have the same problem if you used javac in your command instead of j2objc.
--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages