gson null in GazeManager
Posted: 20 Mar 2015, 22:50
I grabbed the java client from github and made it into a successfully building-from-source library that is part of an existing Android studio project I have. I got a crash in onGazeApiResponse at the first use of gson:
I added a "gson = new Gson();" in the class's constructor, and it began working. It seems impossible that this is simply a bug - is there another explanation? A difference in the way singletons end up getting compiled between Eclipse and Android Studio or something? Am I going to run into problems after adding this gson initialization?
- Code: Select all
ReplyBase reply = gson.fromJson(jo, ReplyBase.class);
I added a "gson = new Gson();" in the class's constructor, and it began working. It seems impossible that this is simply a bug - is there another explanation? A difference in the way singletons end up getting compiled between Eclipse and Android Studio or something? Am I going to run into problems after adding this gson initialization?