4

After I update gradle version I get such compilation error

enter image description here

Previous gradle

dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
...
}

---

distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

Current

dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
...
}

----

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

So, what am I doing wrong?

Sirop4ik
  • 4,543
  • 2
  • 54
  • 121
  • 1
    I have this problem too, clearly something's up with the Android gradle plugin 3.6.x. I think downgrading to 3.5.3 is the only solution. – Reuben Scratton Apr 21 '20 at 12:40

1 Answers1

4

I had this exact problem and it seems to be an incompatibility with Gradle 3.5.3 and NDK <=18. Upgrading to NDK 21 fixes this issue.

If you need help with updating NDK, you can check out the guide here: https://developer.android.com/studio/projects/install-ndk#specific-version

Also, keep in mind you might have to refresh the NDK location afterwards: https://stackoverflow.com/a/60686251/7273130

Sharp
  • 1,335
  • 1
  • 12
  • 27
  • Actually what I did is - according to the error some files are missing, so I just found them in google and added to the location where it was needed. I am not sure if it is the best way, but it works. Anyway thank you for responce – Sirop4ik May 23 '20 at 14:45
  • That is probably not the best way since you added a file from a newer NDK into the older version. Just properly updating to 21 is likely the best way to do it, assuming you experience no other breaking changes (I didn't). – Sharp May 24 '20 at 10:23