Android Studio 3.1.4 shows unexpected errors

408 views Asked by At

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

2

There are 2 answers

0
hasan_shaikh On BEST ANSWER
  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.

0
Arty On

If your gradle and buildtool is up to date and you sure there is no missing brackets or something like that. Open a new project and copy your code in there. Sometimes android studio makes this weird bugs.