Im trying to use vector drawables on pre lollipop devices. I did all as instructed here but i still get this crash.
build.gradle:
I faced a similar problem and @pedja's own answer is useful.
More generally, as mentioned in Chris Banes's article on vector drawable compat, the support library works by injecting its version of ImageView over the system one on pre-L via some hooks. This implicitly requires the AppCompat versions of classes, such as AppCompatActivity, be used.
In my case, the vector drawable is used in a standalone toast-like view without an associated activity, using the Application context. I ended up using AppCompatImageView in the xml layout definition directly, i.e. something like
thus there is no need for the magic "hook" mechanism. As tested this also works with the Activity class without the need of using AppCompatActivity. All the above was done without upgrading to 23.2.1, which addressed a different problem.