Question: I want to fetch the clientroot of perforce in a perl script.

I wrote the code as :

```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;

```

Instead of printing the path, it prints `0`

Could anyone please tell what I am missing here?

Answer: 
This error happens due to Gradle not synced with the project. go to Tools- Android- Sync Project with Gradle files. Then Run it again.
On newer Android Studio versions, go to File-> Sync project with gradle files
In my case my device didn't have enough memory. After trying out a number of the suggestions here, I finally noticed the notification on my phone about low memory. The notification had been there for hours apparently.