Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How ro refresh/sync a gradle project in VisualStudioCode

I have a gradle project imported into VSCode. I'm new to both gradle and vscode. When I initially imported my project, I didn't have any compilation errors, and it was building just fine. Now, after running gradlew clean, I have red squiggly lines everywhere (even on the Java String keyword).

How do I fix this? I'm looking for the gradle equivalent of mvn install basically, or a way to sync my gradle, if that makes sense.

like image 621
Vismark Juarez Avatar asked Feb 14 '19 05:02

Vismark Juarez


People also ask

How do I force Gradle to sync?

Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.


1 Answers

To sync and refresh you gradle dependencies from VSCode.

cd android
./gradlew --refresh-dependencies

Chill Pill :)

like image 66
Ali Akram Avatar answered Sep 16 '22 15:09

Ali Akram