I'm facing Operator '+' cannot be applied to int,'com.fasterxml.jackson.core.io.SerializedString' Error in run method of a thread. Here's the code block
runOnUiThread(new Runnable() {
public void run() {
ActivityHome.this.scanning_following.setText(ActivityHome.this.mapB.size()
+ MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR
+ ActivityHome.this.getResources().getString(R.string.following)
+ " scanned");
}
});
Either
MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR
orActivityHome.this.getResources().getString(R.string.following)
is not ajava.lang.String
, so you can't apply+
operator to it.You can easily convert them to
java.util.String
by callingtoString()
(this is assumingcom.fasterxml.jackson.core.io.SerializedString
has a meaningful implementation oftoString()
):