avast / android-butterknife-zelezny

Android Studio plug-in for generating ButterKnife injections from selected layout XML.
Apache License 2.0
3.38k stars 412 forks source link

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

Closed mdtaqi98 closed 7 years ago

mdtaqi98 commented 7 years ago

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

mdtaqi98 commented 7 years ago

e2

mdtaqi98 commented 7 years ago

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

TomasKypta commented 7 years ago

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.

mdtaqi98 commented 7 years ago

What would be vaild ? Help me

On 16 Apr 2017 8:21 p.m., "Tomas Kypta" notifications@github.com wrote:

There's no class Bind in ButterKnife 8.x, this class was present in ButterKnife 7.x. I cannot reproduce the problem you are heaving. 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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/avast/android-butterknife-zelezny/issues/130#issuecomment-294355722, or mute the thread https://github.com/notifications/unsubscribe-auth/AYPauBgJGOPJ90MNDmx4pwNlTW1FaP_Pks5rwir4gaJpZM4MqAP9 .

TomasKypta commented 7 years ago

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

Shradhey7 commented 6 years ago

@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 !!