Tag: nullpointerexception butterknife

Android:butterKnife – @BindView – 抛出NPE

Android Studio 2.3.3。 我的布局xml文件: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ProgressBar android:id="@+id/downloadProgressBar" android:layout_width="0dp" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> 在我的应用程序/ build.gradle : apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android' android { compileSdkVersion 26 buildToolsVersion "26.0.2" defaultConfig { applicationId "com.myproject" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" buildTypes […]