Skip to content
Related Articles

Related Articles

Improve Article

How to Use ButterKnifeZelezny X Plugin in Android Studio?

  • Difficulty Level : Expert
  • Last Updated : 18 Feb, 2021
Geek Week

Laziness is one of the most powerful properties of a good programmer, most android developers know about JakeWharton’s ButterKnife annotation library. Without writing repeated elements like findViewById() and setONClickListner(), we use this library, so it can reduce the developer burden to write the same code again and again when there are many views in the layout that need to get references through findViewByID(). The 7 features of butterknife plug-ins are:

  1. Optimize your code.
  2. Binding View.
  3. Also Binding resources.
  4. Provide an event listener.
  5. Provide List adapter.
  6. Privide RecyclerViewAdapter.
  7. Setting View property.

How to Use ButterKnifeZelezny X Plugin in Android Studio

Step 1: Install the plugin in android studio

Open your Android Studio and go to the setting > plugins as shown below image.

Note: You may refer to How to Install and Uninstall Plugins in Android Studio? to Install and Uninstall Plugins in Android Studio.



Search Android ButterKnife Zelezny in plugins marketplace and install the plugin. After completing installation restart the IDE.

Step 2: Open an existing or new project

Go to the build.gradle for dependency.

add dependencies:

dependencies { implementation file tree(dir: ‘libs’, include:[‘*.jar’]) implementation ‘com.jakewharton:butterknife:7.0.1’   

Step 3: Open MainActivity.java file or any activityjava file where you want to add library

Right Click on XMl file notation as shown in above figure, and select insert > Generate butterKinfe injection

Step 4: Select Elements and click on confirm button.

Step 5: Your injection is successfully implemented as shown in figure.

Want a more fast-paced & competitive environment to learn the fundamentals of Android?
Click here to head to a guide uniquely curated by our experts with the aim to make you industry ready in no time!
My Personal Notes arrow_drop_up
Recommended Articles
Page :