ButterKnife Inspections

Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider MPS Android Studio
17.05.2015
10 294
This plugin detect shows inspections for common mistakes using ButterKnife. For now the problems detected are:
  • No call to ButterKnife.inject
  • That a field exists in all layouts or is optional
  • That the type of the field matches in all views

The detection for which layouts to check for matching ids is based on the following:

  • Each setContentView call in onCreate of an activity
  • Each inflate in onCreateView in a Fragment
  • Each inflate in each constructor in a View
  • Trying to figure out for ViewHolders by data flow analysis and find usages

Download plugin

Recent change notes

support for included xmls support for ViewHolder-pattern