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?

1
  • 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. Commented Apr 21, 2020 at 12:40

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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
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).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.