Only compile-time constants may be passed to log(String); use one of the formatting log methods with a constant format string if at all possible.

Some common fixes include:

If none of these work, the easiest workaround is to use "%s" as a format string, i.e. replace log(expr) with log("%s", expr).