Published in


Moshi Kotlin Codegen + R8 出現 parameter type is null

Moshi 是一個 JSON serialization/deserialization 的 library。和 Gson 不同的是它提供了 Kotlin Codegen,它可以生成 serialization/deserialization 的 adapter class,所以可以避免使用 reflection,而且 adapter 還會參照 Kotlin 的 non-null 和 default value。不過最近發現 production app 會出現 parameter type is null 的錯誤訊息。

parameter type is null
parameter type is null
java.lang.NoSuchMethodException: parameter type is null
at java.lang.Class.getConstructor0(…




My Personal Logbook

Recommended from Medium

The holy grail of data platforms and why I rejoined Databricks

Properly Creating ZIP Archives on MacOS

The Death of Cannot Reproduce

Programming Languages: What does it mean when something is “redundant”?

Coronavirus Hits Excessively Near and dear

RouterOS: Chain to Root

Python for Developers — 100daysoflearning (PART 5)

Passing the era of “text input, text output” style of programming

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eric Li

Eric Li

Hongkonger + Android developer

More from Medium

Kotlin Lambdas

Coroutines In Kotlin

Enums In Kotlin

MultiImageView with LayerList