3

I'm new to Java and Butterknife, so I'm having some troubles. In this code, the function is logging that login button works, but I'm actually stuck because I see just nothing about my app's errors or this button's log. I'm really confused and thanks for your help.

Now, apt is Unknown dependency for AIDE. That's my problem...

    @BindView(R.id.input_email) EditText _emailText;
    @BindView(R.id.input_password) EditText _passwordText;
    @BindView(R.id.btn_login) Button _loginButton;
    @BindView(R.id.link_signup) TextView _signupLink;
    @OnClick(R.id.btn_login) void logme(){
        login();
    }
    ... 
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        ButterKnife.bind(this);
    }
   .... 

public void login() {
        Log.d(TAG, "Login");
... 

Here comes project build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.+'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}

Here comes subproject build.gradle

apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        applicationId "dr.war.qpython.net"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.android.support:design:+'
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:design:+'
    compile 'com.jakewharton:butterknife:8.1.0'
    apt 'com.jakewharton:butterknife-compiler:8.1.0'
    compile fileTree(dir: 'libs', include: ['*.jar'])
}
Walker
  • 131
  • 2
  • 16

1 Answers1

-1

try adding the view in the function, replacing

@OnClick(R.id.btn_login) void logme(){

with

@OnClick(R.id.btn_login) void logme(View view){
tibbi
  • 249
  • 4
  • 27