1
在library我使用有重載的方法:如何解決曖昧參考超載定義
put(String key, Integer value)
put(String key, Long value)
put(String key, Double value)
put(String key, Float value)
我想把String
與Int
值,但我得到以下錯誤:
Error:(41) ambiguous reference to overloaded definition,
both method put in class ContentValues of type (x$1: String, x$2: Double)Unit
and method put in class ContentValues of type (x$1: String, x$2: Float)Unit
match argument types (String,Long)
我該怎麼辦呢?