After Updating Android Studio from 3.0 to 3.1 My project gradle syncing failed with the following error.
Gradle sync failed: Uninitialized object exists on
This is a bug of JDK old versions i guess. Go to the project structure and change your project to latest JDK like 1.80_72 or later versions.
Hopefully it will fix your problem.