Recently updated SDK to 26 and I’m constantly getting a build error. Have been breaking my head over this for quite some time now without any results. The threads that talk about this do not seem to be working for me at all. Screenshot of the error below. Any one able to shed more light on this, please? Will appreciate.
-
post your build.gradle – Gabriele Mariotti Aug 12 '17 at 20:26
3 Answers
Had the same issue after updating to Sdk 26. This was caused by a dependency which overrides the named attributes instead of renaming them. See discussion here.
Make sure you or a library in your dependencies do not override these attributes.
For me this was fixed by updating the library from the linked issue discussion to
dependencies {
compile 'uk.co.samuelwall:material-tap-target-prompt:2.0.1'
}

- 891
- 1
- 9
- 14
-
If this helps someone .. It could also be because of a lot of things as mentioned in https://stackoverflow.com/questions/44196672/aapt2-compile-failed-invalid-dimen-on-android-3-0-canary-1. But even after disabling Aapt2, I kept getting the same error until I found the above one. Thanks – Jaswanth Manigundan Sep 01 '17 at 05:07
Looks like you are using a library that tries to override these SDK attributes in the wrong way.
I think you can double click the error to see who is the culprit.
Ensure that you are using consistent maior versions of libraries, for example, use v26.*
support libraries so they are consistent with the SDK.

- 24,954
- 17
- 88
- 158
-
Thanks @natario, I’ve tried removing all third-party libraries. Versioning is also consistent. However, the problem persists. – Priyank Sharma Aug 12 '17 at 13:00
Attribute iconTint is only used in api 26 or higher. Make sure you have used targetSdkVersion & compileSdkVersion 26 or above with support library version 26.+.

- 863
- 6
- 19