So my Android Studio recently updated to build tools version 23.0.2 while working on some Material design updates for my apps. Testing primarily on versions 22+, I hadn't noticed any issues when attempting to compile. However, once testing down to 14 (lowest version currently supported by the apps), I was encountering the following error:
Error inflating class android.support.v7.widget.Toolbar Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v19/abc_ic_ab_back_material.xml After reading this article, AppCompat v23.2 — Age of the vectors, the reasoning behind the error as well as the respective fix can be found. The flag to be enabled in gradle is listed for versions 2.0+ and 1.5 or below. Mistakenly thinking that I was on version 2.0+, the first flag did not work and resulted in the vectorDrawables being non-resolvable. After some research, it was discovered that I was most likely on the 1.5 version or below. However, that flag triggered errors too, particularly for the generatedDensities property as described in the Stack Overflow problem. A final check of the top-level gradle file finally revealed the problem -- it was still referencing 1.2.3! Build system versions are listed at this link - New Build Systems - Android Tools Project Site. Setting the dependencies in the top-level build.gradle, recompile, and voila. |
AuthorExploring Android and mobile web design, security, and development. Archives
March 2021
Categories |