Good day, I am trying to use Fast Adapter library in my project. I read the installation guide from this link https://github.com/mikepenz/FastAdapter. The synchronization of my project successfully built but I got this warning (captured link) that says,

"It looks like you are trying to substitute a version variable, but using single quotes (')."

implementation 'com.android.support:appcompat-v7:${latestSupportLib}'

Although the project was successfully built, it so annoying for me to see the red line under the implemented library. Is it okay to ignore that warning or is there any way to fix that warning?

enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

You should replace

implementation 'com.android.support:appcompat-v7:${latestSupportLib}'

with

implementation "com.android.support:appcompat-v7:${latestSupportLib}"

or

implementation 'com.android.support:appcompat-v7:27.1.1'

(where 27.1.1 is the current latest stable version of the Android support library).

See http://docs.groovy-lang.org/latest/html/documentation/#_string_interpolation (my emphasis):

Any Groovy expression can be interpolated in all string literals, apart from single and triple single quoted strings.

(The fact that the project currently builds at all surprises me!)