1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Android】 ProGuard利用時にGsonでMissing type parameterが出るときの対策

Posted at

概要

ProGuard利用時にGsonでMissing type parameterのエラーが出たときの対処法メモです。

エラー内容

java.lang.RuntimeException: Missing type parameter.

対策

以下のような指定を追加すればOK

# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }

com.google.gson.examples.android.model.**の部分は例なので自分のアプリのパッケージまたはクラスを指定する。

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?