Android Studio: how to increase set ANDROID_LINT_MAX_VIEW_COUNT

737 Views Asked by At

My Android application, being prepared in Android Studio 3.5.3, has a layout with more than 80 different views (and this number will grow). So, the warning layout has too many views appears. I'd like to increase variable ANDROID_LINT_MAX_VIEW_COUNT up to 100 (as it is advised in the warning), but I cannot find where it can be done. Menu File->Settings->inspections does provide option Perfomance->Application size->layout has too many views describing this warning, so it is possible to suppress it. However, I'd like just to increase ANDROID_LINT_MAX_VIEW_COUNT, not to suppress it at all. I've found an advice to create environment variable ANDROID_LINT_MAX_VIEW_COUNT setting it to 100, but it does not work.

Thanks for any idea

1

There are 1 best solutions below

0
Spectorsky On

ANDROID_LINT_MAX_VIEW_COUNT is indeed an environment variable. After setting it to a proper value, Android Studio has to be restarted, that I didn't. After restarting, the warning layout has too many views disappeared.