avast / android-butterknife-zelezny

Android Studio plug-in for generating ButterKnife injections from selected layout XML.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

butterknife @genarate not working{Error:(23, 6) error: cannot find symbol class Bind}

mdtaqi98 opened this issue · comments

e1
last problem

as seen in the image i have give the **genarate->Butterknife in setconfig in .jave file
R.id in error
help ,me

This happend when i click ->confirm <-it gets blank and stops working

There's no class Bind in ButterKnife 8.x, this class was present in ButterKnife 7.x.
I cannot reproduce the problem you are having.
The plugin is correctly generating BindView annotations.

The variable names have to be valid Java variable names. Strings like "R.idBtnLogin" aren't valid variable names. That's why the input fields are red and confirm will do nothing.

First try use those that the plugin propose. The input fields are pre-filled with those when you open it.

For possible names, please check Naming section in https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html

@mdtaqi98 Bro did you find the answer to your problem , if yes , then update it here because I am struggling with it .

//Build.Gradle   ->
apply plugin: 'com.android.application'
//apply plugin: 'com.android.library'
//apply plugin: 'com.jakewharton.butterknife'

//External Code Starts

buildscript {
    repositories {
        google() // Gradle 4.0+
        maven { url "https://maven.google.com" } // Gradle < 4.0
        mavenCentral()
    }

    dependencies {
        classpath "com.android.tools.build:gradle:3.0.0"
        // classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
    }
}

// External Code Ends

android {
    compileSdkVersion 26
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.qihancloud.librarydemo"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 20170413
        versionName "1.1.7"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'

    compile 'com.jakewharton:butterknife:7.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:7.0.0'

    api(name: 'QihanOpenSDK_2.0.0', ext: 'aar')

}

repositories {
    flatDir {
        dirs 'libs'
    }
    google()
}

allprojects {
    repositories {
        jcenter()
    }
}
//Build.Gradle  ->
//Settings.Gradle ->
include ':QihanOpenSDK_2.0.0'
include ':jakewharton:butterknife:8.4.0'
//Settings.Gradle ->

Help is needed !!