In my Scala Android project I'm getting the curious error:
type mismatch; found : android.accounts.android.accounts.AccountManagerCallback[Boolean] required: android.accounts.android.accounts.AccountManagerCallback[Boolean]
when calling 'removeAccount' in the code below:
val accountManager = android.accounts.AccountManager.get(this)
for (account <- accountManager.getAccounts) {
accountManager.removeAccount(account,
new AccountManagerCallback[Boolean] {
override def run(result: AccountManagerFuture[Boolean]) {
try {
result.getResult(3, TimeUnit.SECONDS)
} catch {
case e: Exception => Log.d(getClass.getName, "exception: ", e)
}
}
}, new Handler())
}
}
Any ideas on what's going wrong and what can I do to placate the type checker?