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: 
I was facing similar kind of problem.There is image of error attached.Error is highlighted in red.
Turning off the Instant run removed error for Android Studio 2.3 and 3.1.4.

[![Error, after running the app](https://i.stack.imgur.com/TE4VF.png)](https://i.stack.imgur.com/TE4VF.png)
[![Turning off the Instant run](https://i.stack.imgur.com/iozN1.png)](https://i.stack.imgur.com/iozN1.png)
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