Android : both method put in class ContentValues of type

on Thursday, August 7, 2014


A part of Scala-Android application:



val contentValues = new ContentValues()
val value: Long = 123
contentValues.put("key", value)


It throws an exception:



ambiguous reference to overloaded definition,
[ant:scalac] both method put in class ContentValues of type (x$1: String, x$2: Double)Unit
[ant:scalac] and method put in class ContentValues of type (x$1: String, x$2: Float)Unit


What does it have to do with Double and Float if there is put(String, Long): Unit in Android library which must be used here? Why isn't it being applying here?


0 comments:

Post a Comment