Bind Android views and callbacks to fields and methods.

Overview

Butter Knife

Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only critical bug fixes for integration with AGP will be considered. Feature development and general bug fixes have stopped.

Logo

Field and method binding for Android views which uses annotation processing to generate boilerplate code for you.

  • Eliminate findViewById calls by using @BindView on fields.
  • Group multiple views in a list or array. Operate on all of them at once with actions, setters, or properties.
  • Eliminate anonymous inner-classes for listeners by annotating methods with @OnClick and others.
  • Eliminate resource lookups by using resource annotations on fields.
class ExampleActivity extends Activity {
  @BindView(R.id.user) EditText username;
  @BindView(R.id.pass) EditText password;

  @BindString(R.string.login_error) String loginErrorMessage;

  @OnClick(R.id.submit) void submit() {
    // TODO call server...
  }

  @Override public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.simple_activity);
    ButterKnife.bind(this);
    // TODO Use fields...
  }
}

For documentation and additional information see the website.

Remember: A butter knife is like a dagger, only infinitely less sharp.

Download

android {
  ...
  // Butterknife requires Java 8.
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

dependencies {
  implementation 'com.jakewharton:butterknife:10.2.3'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
}

If you are using Kotlin, replace annotationProcessor with kapt.

Snapshots of the development version are available in Sonatype's snapshots repository.

Library projects

To use Butter Knife in a library, add the plugin to your buildscript:

buildscript {
  repositories {
    mavenCentral()
    google()
  }
  dependencies {
    classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
  }
}

and then apply it in your module:

apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'

Now make sure you use R2 instead of R inside all Butter Knife annotations.

class ExampleActivity extends Activity {
  @BindView(R2.id.user) EditText username;
  @BindView(R2.id.pass) EditText password;
...
}

License

Copyright 2013 Jake Wharton

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Android studio 3.0 butterknife error

    Android studio 3.0 butterknife error

    Android studio version: Android studio 3.0 preview gradle plugin:

            classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
            classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'
    

    expection:

    Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
    Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
    <a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
    <a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
    

    I commented out the plugin(classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'), then sync through

    opened by weinierfei 62
  • Support incremental annotation processing.

    Support incremental annotation processing.

    Addresses issue: #1225

    With #1045, the support for incremental annotation processing is complete. It would be really nice to see 9.0.0 released with this soon ;) (let me know if I can help)

    opened by stephanenicolas 43
  • An Obsolete warning API

    An Obsolete warning API " 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'." is shown in Library At V10.1.0

    I just follow the README.md like these

     dependencies {
       implementation 'com.jakewharton:butterknife:10.1.0'
       annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
     }
    
     buildscript {
       repositories {
         mavenCentral()
        }
       dependencies {
         classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
       }
     }
    
    apply plugin: 'com.android.library'
    apply plugin: 'com.jakewharton.butterknife'
    

    There is no problems when I use the low version buttknife(8.4) AndroidStudio(3.2) Gradle(3.2.0). But now , a situation occurs that a weird Warning will be shown since I update Android-studio and Gradle.

    Like this ↓↓↓↓↓↓

    WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
    It will be removed at the end of 2019.
    For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
    To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
    

    On my case ↓↓↓ 1.AndroidStudio- Version 3.3.1 2.Gradle PlugIn version:3.3.1 and Gradle version:4.10.1-all.

    It can work, it can be run and even Generated Into realeased APK. Everything is okay, but it's so bothering that it shows here every time . So what should I do to solve this problem?

    opened by EksDimension 39
  • Missing resource ID

    Missing resource ID

    I'm running:

    • Android Studio 2.3.3
    • Kotlin 1.1.2-3
    • Butterknife 8.6.0

    My project has an app module an a library module, in the app module I've included:

    dependencies {
        ...
        compile "com.jakewharton:butterknife:$butterknife_version"
        kapt "com.jakewharton:butterknife-compiler:$butterknife_version"
    }
    

    In the library module I have:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath "com.jakewharton:butterknife-gradle-plugin:$butterknife_version"
        }
    }
    
    apply plugin: 'com.android.library'
    apply plugin: 'com.jakewharton.butterknife'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    apply plugin: 'kotlin-kapt'
    android {
        ...
    }
    dependencies {
        ...
        compile "com.jakewharton:butterknife:$butterknife_version"
        kapt "com.jakewharton:butterknife-compiler:$butterknife_version"
    }
    

    My library code includes a custom view called CameraControlView with the following:

    @OnClick(R2.id.switch_camera)
    fun switchCamera() {
    }
    

    The generated CameraControlView_ViewBinding.java has the following offending line:

    view = Utils.findRequiredView(source, 2131493059, "method 'switchCamera'");
    

    R2.id.switch_camera is 0x7f0c00c3 (2131493059) R.id.switch_camera is 0x7f0c00c3 in library R.id.switch_camera is 0x7f100186 in app

    Am I configuring butterknife wrong for the library or is this a bug?

    opened by yperess 39
  • All bind view are null

    All bind view are null

    public class AccountFragment extends BaseFragment {
    
        @Bind( R.id.editText_email ) EditText editText_email;
        @Bind( R.id.editText_password ) EditText editText_password;
        @Bind( R.id.textView_contract ) TextView textView_contract;
    
        private Realm realm;
    
        @Override
        public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ) {
    
            View rootView = inflater.inflate( R.layout.fragment_sign_in, container, false );
            setRootView( rootView );
            ButterKnife.bind( this, rootView );
    
            init();
            refresh();
            return rootView;
        }
            ...
    }
    
    

    in ButterKnife 8.0.0 snap shot ButterKnife 7.0.1

    editText_email / editText_password / textView_contract are null ,

    my project in android studio compileSdkVersion 23 ( tried v22 ) multiDexEnabled true Application extended MultiDexApplication turn off proguard

    and use rxAndroid, realm, kotlin

    plz Help

    error log :

    D/ButterKnife: Looking up view binder for com.moka.earlybird.application.mvc.controller.account.AccountFragment
    D/ButterKnife: Not found. Trying superclass com.moka.framework.controller.BaseFragment
    D/ButterKnife: Not found. Trying superclass android.support.v4.app.Fragment
    D/ButterKnife: MISS: Reached framework class. Abandoning search.
    
    opened by moka-a 36
  • java.lang.NullPointerException

    java.lang.NullPointerException

    
    1. @BindView(R.id.email_sign_in_button)
    2. Button emailSignInButton;
    3. 
    4. @Override
    5. protected void onCreate(Bundle savedInstanceState) {
    6.         super.onCreate(savedInstanceState);
    7.         setContentView(R.layout.activity_login);
    8. 
    9.         ButterKnife.bind(this);
    10. 
    11.         // @OnClick()点击事件失效,所以采用该方式测试
    12.         // @OnClick() Click event failure, so the test using this way
    13.         emailSignInButton.setOnClickListener(new View.OnClickListener() {
    14.             @Override
    15.             public void onClick(View view) {
    16.                 ToastUtils.showShort(LoginActivity.this, "Can help me? thanks.");
    17.             }
    18.       });
    19. }
    20.
    21.@OnClick(R.id.email_sign_in_button)
    22.public void onClick() {
    23.        ToastUtils.showLong(this, "output");
    24.}
    
    

    But 13 line error: java.lang.NullPointerException

    Module gradle:

    dependencies {
        // 编译ButterKnife注解框架(Compile ButterKnife annotation framework)
        compile 'com.jakewharton:butterknife:8.4.0'
        annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
    }
    

    是我的配置出错了么?(Is my configuration error?)

    opened by ljf1172361058 33
  • Required bound views are null after calling ButterKnife.bind(this)

    Required bound views are null after calling ButterKnife.bind(this)

    I've just tried updating to the 7.0.0 release of Butter Knife from 6.1.0 and am encountering an immediate NPE. The only changes are updating the number in build.gradle, replacing InjectView with Bind, and ButterKnife.inject with ButterKnife.bind. Pausing with the debugger shows that none of the @Bind variables are being initialized, all are null.

    In StartActivity (extends MyFragmentActivity)

    ...
    @Bind(R.id.loginFormHints) LinearLayout loginFormHints;
    ...
    
    @Override protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState, R.layout.activity_start);
      ButterKnife.bind(this);
    
      // Use loginFormHints
      Helpers.stripeLinearLayout(this, loginFormHints);
      ...
    }
    

    And the referenced super.onCreate in MyFragmentActivity (extends FragmentActivity)

    protected void onCreate(Bundle savedInstanceState, int layout) {
        super.onCreate(savedInstanceState);
    
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(layout);
    }
    

    The, uninteresting, error log

    E  Caused by: java.lang.NullPointerException
    E      at com.myapp.helpers.Helpers.stripeLinearLayout(Helpers.java:102)
    E      at com.myapp.helpers.Helpers.stripeLinearLayout(Helpers.java:133)
    E      at com.myapp.activities.StartActivity.onCreate(StartActivity.java:84)
    E      at android.app.Activity.performCreate(Activity.java:5431)
    
    opened by dkozel 32
  • Add butterknife-1.2.2.jar to my project,but cann't run the app. How to use?

    Add butterknife-1.2.2.jar to my project,but cann't run the app. How to use?

    I create a android app, add butterknife-1.2.2.jar to my project.

    Write some code like this

    public class MainActivity extends Activity {

    @InjectView(R.id.hello) TextView tvHello;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Views.inject(this);
        // tvHellp = (TextView) findViewById(R.id.hello);
        tvHello.setText("knife ok!!");
    }
    

    }

    then run the application.

    Problem: The app throw some exception.

    03-14 14:18:41.169: E/AndroidRuntime(2306): FATAL EXCEPTION: main 03-14 14:18:41.169: E/AndroidRuntime(2306): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testknife/com.example.testknife.MainActivity}: butterknife.Views$UnableToInjectException: Unable to inject views for com.example.testknife.MainActivity@45ff94f8 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread.access$2300(ActivityThread.java:135) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.os.Handler.dispatchMessage(Handler.java:99) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.os.Looper.loop(Looper.java:144) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread.main(ActivityThread.java:4937) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.reflect.Method.invokeNative(Native Method) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.reflect.Method.invoke(Method.java:521) 03-14 14:18:41.169: E/AndroidRuntime(2306): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 03-14 14:18:41.169: E/AndroidRuntime(2306): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 03-14 14:18:41.169: E/AndroidRuntime(2306): at dalvik.system.NativeStart.main(Native Method) 03-14 14:18:41.169: E/AndroidRuntime(2306): Caused by: butterknife.Views$UnableToInjectException: Unable to inject views for com.example.testknife.MainActivity@45ff94f8 03-14 14:18:41.169: E/AndroidRuntime(2306): at butterknife.Views.inject(Views.java:116) 03-14 14:18:41.169: E/AndroidRuntime(2306): at butterknife.Views.inject(Views.java:65) 03-14 14:18:41.169: E/AndroidRuntime(2306): at com.example.testknife.MainActivity.onCreate(MainActivity.java:17) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069) 03-14 14:18:41.169: E/AndroidRuntime(2306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751) 03-14 14:18:41.169: E/AndroidRuntime(2306): ... 11 more 03-14 14:18:41.169: E/AndroidRuntime(2306): Caused by: java.lang.ClassNotFoundException: com.example.testknife.MainActivity$$ViewInjector 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.Class.classForName(Native Method) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.Class.forName(Class.java:235) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.Class.forName(Class.java:182) 03-14 14:18:41.169: E/AndroidRuntime(2306): at butterknife.Views.inject(Views.java:108) 03-14 14:18:41.169: E/AndroidRuntime(2306): ... 15 more 03-14 14:18:41.169: E/AndroidRuntime(2306): Caused by: java.lang.NoClassDefFoundError: com.example.testknife.MainActivity$$ViewInjector 03-14 14:18:41.169: E/AndroidRuntime(2306): ... 19 more 03-14 14:18:41.169: E/AndroidRuntime(2306): Caused by: java.lang.ClassNotFoundException: com.example.testknife.MainActivity$$ViewInjector in loader dalvik.system.PathClassLoader[/data/app/com.example.testknife-2.apk] 03-14 14:18:41.169: E/AndroidRuntime(2306): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 03-14 14:18:41.169: E/AndroidRuntime(2306): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 03-14 14:18:41.169: E/AndroidRuntime(2306): ... 19 more

    Any wrong whit my project?

    opened by rayboot 31
  • Build fails with androidX and jetifier enabled

    Build fails with androidX and jetifier enabled

    I migrated my project to androidX. Now I get the following error message on building the project:

    The given artifact contains a string literal with a package reference 'android.support.v4.content' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.

    Caused by: java.lang.RuntimeException: Failed to transform butterknife-compiler-9.0.0-rc1.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.v4.content' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.

    gradle.properties:

    ...
    android.useAndroidX=true
    android.enableJetifier=true
    

    build.gradle (app module)

    ...
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-kapt'
    apply plugin: 'kotlin-android-extensions'
    
     compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    
     buildToolsVersion '28.0.3'
    
    implementation 'com.jakewharton:butterknife:9.0.0-rc1'
    kapt 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
    
    

    gradle distribution: gradle-4.10.2

    I've tried using different versions of the artifacts, still getting the same error

    opened by j-ns 30
  • ButterKnife generates ViewBinding class with wrong resource ID

    ButterKnife generates ViewBinding class with wrong resource ID

    I am using a 3rd-party library in our project, and compilation works fine, but the app crashes when it starts up. I looked at the logcat and generate source code, it seems the generated source code has the wrong resource ID.

    For example, the source file is

    class HomeActivity ... {
        @BindView(R2.id.mode_transition_layout) AppModeTransitionLayout modeTransitionLayout;
    
        @Override
        protected void onCreate(@Nullable Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
    
            setContentView(R.layout.activity_main);
            ButterKnife.bind(this);
    

    The generated HomeActivity_ViewBinding class has

      @UiThread
      public HomeActivity_ViewBinding(T target, View source) {
        this.target = target;
    
        target.modeTransitionLayout = Utils.findRequiredViewAsType(source, R.id.infant_description_text, "field 'modeTransitionLayout'", AppModeTransitionLayout.class);
      }
    

    R.id.infant_description_text is a different resource ID, and I'd assume here should use R.id.mode_transition_layout.

    At the runtime I get an exception says java.lang.IllegalStateException: Required view 'infant_description_text' with ID 2131822441 for field 'modeTransitionLayout' was not found. If this view is optional add '@Nullable' (fields) or '@Optional' (methods) annotation.

    We are using ButterKnife 8.4.0.

    Any help is highly appreciated!

    opened by engian 29
  • Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'

    Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'

    8.8.1 gradle 3.0.0 Android Studio 3.0 Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'. Possible causes for this unexpected error include:

    In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

    opened by ohshi000 26
  • Task :app:processDebugMainManifest FAILED

    Task :app:processDebugMainManifest FAILED

    Task :app:processDebugMainManifest FAILED gettting this error because of react-native-push-notifications i tried cd android then cd .\gradlew clean

    any solution?

    Originally posted by @Talha-raj in https://github.com/JakeWharton/butterknife/issues/1490#issuecomment-1171994253

    opened by Talha-raj 3
  • BUILD FAILED AGP: 7.0 , Gradle JDK: openjdk-16.0.2

    BUILD FAILED AGP: 7.0 , Gradle JDK: openjdk-16.0.2

    gradle-wrapper.properties: distributionUrl=https://services.gradle.org/distributions/gradle-7.1.1-bin.zip

    build.gradle(root project) dependencies { classpath 'com.android.tools.build:gradle:7.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3' }

    build.gradle(:app): plugins { id 'com.android.application' id 'kotlin-android' id 'com.jakewharton.butterknife' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } implementation 'com.jakewharton:butterknife:10.2.3' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'

    Gradle JDK: /user/xxx/Java/JavaVirtualMachines/openjdk-16.0.2/Contents/Home

    Error Log:

    • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

    superclass access check failed: class butterknife.compiler.ButterKnifeProcessor$RScanner (in unnamed module @0x3b0e21fe) cannot access class com.sun.tools.javac.tree.TreeScanner (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x3b0e21fe

    • Try: Run with --scan to get full insights.

    • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188) at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:186) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: java.lang.IllegalAccessError: superclass access check failed: class butterknife.compiler.ButterKnifeProcessor$RScanner (in unnamed module @0x3b0e21fe) cannot access class com.sun.tools.javac.tree.TreeScanner (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x3b0e21fe at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.instantiateProcessor(AnnotationProcessingCompileTask.java:138) at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.setupProcessors(AnnotationProcessingCompileTask.java:110) at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:93) at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57) at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:54) at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:39) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:97) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37) at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:51) at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:37) at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:46) at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:36) at org.gradle.jvm.toolchain.internal.DefaultToolchainJavaCompiler.execute(DefaultToolchainJavaCompiler.java:57) at org.gradle.api.tasks.compile.JavaCompile.lambda$createToolchainCompiler$1(JavaCompile.java:231) at org.gradle.api.internal.tasks.compile.CleaningJavaCompiler.execute(CleaningJavaCompiler.java:53) at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory.lambda$createRebuildAllCompiler$0(IncrementalCompilerFactory.java:52) at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:67) at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:41) at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:65) at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:51) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:59) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:51) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler.execute(CompileJavaBuildOperationReportingCompiler.java:51) at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:278) at org.gradle.api.tasks.compile.JavaCompile.performIncrementalCompilation(JavaCompile.java:164) at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:145) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:506) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:74) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:74) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:491) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:474) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:106) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:271) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:249) at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:83) at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:37) at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50) at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:47) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:37) at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68) at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:50) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29) at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54) at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27) at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174) at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74) at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:85) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:42) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:91) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:51) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:72) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:46) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31) at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:284) at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40) at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30) at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37) at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33) at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:185) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:5

    opened by christopherzhang 6
  • Can't generate ViewBinding Code

    Can't generate ViewBinding Code

    `buildscript { ext.kotlin_version = '1.4.21'

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
    }
    

    }this is my project gradleapply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions'

    android { compileSdkVersion 30 buildToolsVersion "30.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 30 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" kapt { arguments { arg("AROUTER_MODULE_NAME", project.getName()) } } }

    buildFeatures {
        viewBinding true
    }
    
    viewBinding {
        enabled = true
    }
    sourceSets {
        main {
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs']
        }
    }
    buildTypes {
        debug {
            // 显示Log
            buildConfigField "boolean", "LOG_DEBUG", "true"
        }
        release {
            // 不显示Log
            buildConfigField "boolean", "LOG_DEBUG", "false"
        }
    }
    useLibrary 'org.apache.http.legacy'
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
    
    kotlinOptions {
        jvmTarget = '1.8'
    }
    

    }

    def ktxVersion = "2.3.0"

    dependencies { api fileTree(include: ['*.jar'], dir: 'libs') api 'com.jakewharton:butterknife:10.2.3' api 'androidx.lifecycle:lifecycle-extensions:2.2.0' api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" api 'androidx.core:core-ktx:1.3.2' api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3" api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3' api "androidx.lifecycle:lifecycle-viewmodel-ktx:$ktxVersion" api "androidx.lifecycle:lifecycle-livedata-ktx:$ktxVersion" api "androidx.activity:activity-ktx:1.2.2" api 'androidx.fragment:fragment-ktx:1.3.2' }` and this is my base module gradle

    `apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt'

    android { compileSdkVersion 30 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.nucarf.member" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion 30 } }

    buildFeatures {
        viewBinding true
    }
    
    kotlinOptions {
        jvmTarget = '1.8'
    }
    

    repositories { flatDir { dirs 'libs' } } pendencies {

    kapt 'com.jakewharton:butterknife-compiler:10.2.3'
    

    }

    this is my app gradle ,app depends on base module .but in my app 's build dir generated/ap_generated_sources,can't generate code

    `

    opened by lalozhang 0
  • Cannot resolve method 'bind'

    Cannot resolve method 'bind'

    bind method not found in android studio 4.2 and gralde 4.2.0

    implementation 'com.jakewharton:butterknife:10.2.3' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'

    build.gradle dependencies { classpath 'com.android.tools.build:gradle:4.2.0' classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3' }

    opened by sanketkoladiya 0
  • R8: synthesized for lambda desugaring: Type `butterknife.Unbinder$-CC` was not found,

    R8: synthesized for lambda desugaring: Type `butterknife.Unbinder$-CC` was not found,

    R8: synthesized for lambda desugaring: Type butterknife.Unbinder$-CC was not found, it is required for default or static interface methods desugaring of void butterknife.-$$Lambda$Unbinder$aAZZEjRDCcxQlrGZAdKWmLXqruY.unbind()

    opened by lightfifty 0
A fast dependency injector for Android and Java.

Dagger A fast dependency injector for Java and Android. Dagger is a compile-time framework for dependency injection. It uses no reflection or runtime

Google 16.9k Jan 5, 2023
A fast dependency injector for Android and Java.

Dagger 1 A fast dependency injector for Android and Java. Deprecated – Please upgrade to Dagger 2 Square's Dagger 1.x is deprecated in favor of Google

Square 7.3k Jan 5, 2023
A multi-purpose library containing view injection and threading for Android using annotations

SwissKnife A multi-purpose Groovy library containing view injection and threading for Android using annotations. It's based on both ButterKnife and An

Jorge Martin Espinosa 251 Nov 25, 2022
:syringe: Transfuse - A Dependency Injection and Integration framework for Google Android

Transfuse Transfuse is a Java Dependency Injection (DI) and integration library geared specifically for the Google Android API. There are several key

John Ericksen 224 Nov 28, 2022
Simple Android Library, that provides easy way to start the Activities with arguments.

Warning: Library is not maintained anymore. If you want to take care of this library, propose it via Pull Request. It needs adjustmensts for newer ver

Marcin Moskała 429 Dec 15, 2022
Fast Android Development. Easy maintainance.

Fast Android Development. Easy maintenance. AndroidAnnotations is an Open Source framework that speeds up Android development. It takes care of the pl

null 11.1k Dec 31, 2022
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.

Toothpick (a.k.a T.P. like a teepee) Visit TP wiki ! What is Toothpick ? Toothpick is a scope tree based Dependency Injection (DI) library for Java. I

Stéphane Nicolas 1.1k Jan 1, 2023
Fast Android Development. Easy maintainance.

Fast Android Development. Easy maintenance. AndroidAnnotations is an Open Source framework that speeds up Android development. It takes care of the pl

null 11.1k Dec 31, 2022
Google Guice on Android, version 3.0 [RETIRED]

As of August 2016, RoboGuice is no longer supported. For nearly 5 years it was the #1 dependency injection framework on Android due to its ease-of-use

null 3.8k Dec 26, 2022
Lightweight, minimalistic dependency injection library for Kotlin & Android

‼️ This project is in maintenance mode and not actively developed anymore. For more information read this statement. ‼️ Katana Katana is a lightweight

REWE Digital GmbH 179 Nov 27, 2022
A SharedPreference "injection" library for Android

PreferenceBinder A SharedPreferences binding library for Android. Using annotation processing, this library makes it easy to load SharedPreferences va

Denley Bihari 232 Dec 30, 2022
lite your android ! the code is on the way~

android-lite-auto lite your android, the code is on the way~ ! LiteAuto是一个代码生成框架,思路参考 JakeWharton 的开源项目 ButterKnife,在它的思路基础添加了一些自己的想法,从0到1设计并实现的。 Lite

马天宇 32 Nov 2, 2022
Easier creation of Dagger ObjectGraph scopes with Retrofit and Butterknife niceties

Scopes ###What is Scopes? Have you ever tried to set up scoped ObjectGraphs with Dagger and failed miserably? Scopes is a compile time annotation proc

null 35 Dec 30, 2019
Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 6 and above, brought to you by Google.

Guice Latest release: 5.0.1 Documentation: User Guide, 5.0.1 javadocs, Latest javadocs Continuous Integration: Mailing Lists: User Mailing List Licens

Google 11.7k Jan 1, 2023
Gradle plugin to add clock trackings to your dagger components and subcomponents

⏰ Dagger Track A gradle plugin that automatically adds clock tracking for your components and subcomponents. Features DaggerTrack will tell you follow

Amanjeet Singh 60 Aug 16, 2022
DI can be simple. Forget about modules and components. Just use it!

PopKorn - Kotlin Multiplatform DI PopKorn is a simple, powerful and lightweight Kotlin Multiplatform Dependency Injector. It doesn't need any modules

Pau Corbella 145 Dec 25, 2022
The dependency injection Dagger basics and the concepts are demonstrated in different branches

In this project we will look at the dependency injection Dagger basics and the concepts are demonstrated in different branches What is an Dependency?

Lloyd Dcosta 6 Dec 16, 2021
Bind Android views and callbacks to fields and methods.

Butter Knife Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only criti

Jake Wharton 25.7k Mar 22, 2021
Janishar Ali 2.1k Jan 1, 2023
Add new features for reverse engineering, such as: renaming of classes, fields, methods, variables, reference graphs and more.

Super JADX features Add new features for reverse engineering, such as: renaming of classes, fields, methods, variables, reference graphs and more. bas

null 284 Dec 28, 2022