Sorry for my english.
I'm trying to create a new project in the Android Studio with Gradle support, but I can't correctly build my project. There is a code:
Gradle 'SportManager' project refresh failed:
Cause: startup failed:
initialization script 'C:\Users\ponomarev\AppData\Local\Temp\ijinit6732759991667918700.gradle': 33: illegal string body character after dollar sign;
solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 33, column 20.
String[] paths = ["/LOGGER-2/c$/Program Files/android-studio/plugins/gradle/lib/gradle-tooling-extension.jar","/LOGGER-2/c$/Program Files/android-studio/plugins/gradle/lib/gradle-tooling-extension-v1.9.jar","/LOGGER-2/c$/Program Files/android-studio/plugins/gradle/lib/gradle-tooling-extension-v1.11.jar","/LOGGER-2/c$/Program Files/android-studio/plugins/gradle/lib/gradle-tooling-extension-v1.12.jar"]
^
1 error
'LOGGER-2' is computer's name in the network.
I see that Gradle don't understand literal dollar sign $ in the following expression: "/LOGGER-2/c$/Program Files/...". How I can fix it issue?
$
in a double-quoted String literal has a special meaning in Groovy - it's used for String interpolation. If you want a literal $
, either use a single-quoted String literal (e.g. 'foo$bar'
), or escape the $
with \
(e.g. "foo\$bar"
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With