Question: After upgrading to Android Studio 2.4 Preview 4 I got this error

> 
> Error:Could not initialize class com.android.ide.common.util.ReadWriteProcessLock
> 
> 
>

Answer: 
The best way is Invalidate / cache restart or open terminal and type 

```
./gradlew --stop

```

For windows

```
gradlew --stop

```
Another convenient method:

> 
> Android Studio -> File -> Invalidate Caches / Restart... -> Invalidate and Restart
> 
> 
>