LoginSignup
1
1

More than 5 years have passed since last update.

GSON2.1.xでStackOverFlowErrorが発生するのを何とかしたい

Posted at

完全にその場しのぎですが、GSON1.7.1を使うとエラーが消えます
盛大にハマった。。

問題の詳細

まずサーバ側の問題かどうか判断するためにcurlで確認した。
サーバからレスポンスを取得するところまでは成功しているみたい。

クライアント側でオブジェクトに変換されずエラーを吐いている。
GSON内のawesomeな処理が無限に呼び出されている様子。。

再現条件

  • gradleを使って最新(2014-01-21時点)の2.2.4を使ってインストールしてた。
    • Android4.1.1 + GSON2.2.4 => 動作する
    • Android4.2.2 + GSON2.2.4 => 動作しない
    • Android4.3 + GSON2.2.4 => 動作しない

対処方法

GSON1.7.1を使いましょう。
参考:https://code.google.com/p/google-gson/issues/detail?id=440&sort=priority

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1