Search code examples
androidandroid-studioandroid-studio-3.1.4

Android Studio 3.1.4 shows unexpected errors


I have updated my android studio to 3.1.4. Everything was working fine but after updating the studio, It is showing unexpected errors.

Followed the below steps to resolve,

  1. Invalidate cache and re-start.
  2. Clean project and re-build.
  3. Deleted .idea files and gradle.

But still facing the same issue. Any help will be appreciated.

Below is the screenshot,

enter image description here


Solution

    1. Remove all the dependencies from your app level build.gradle and save it somewhere.

      dependencies { }

    Your dependencies section will look like this.

    1. Sync the project now, and it will fail.

    2. Add copy your saved dependencies and add them to your dependencies section.

    3. Now go to file -> Sync Project with Gradle File.

    Now you wont find any errors.