mttkay / memento

Apache License 2.0
203 stars 19 forks source link

Problem When Using Memento and Butterknife #12

Open eugenkiss opened 9 years ago

eugenkiss commented 9 years ago

Hi,

I'm trying to use Memento together with Butterknife for this project. When I change the build.gradle according to Memento's README instructions like so

apply plugin: 'com.android.application'

configurations {
    apt
}

android {
    compileSdkVersion 19
    buildToolsVersion "21.1.0"

    defaultConfig {
        applicationId "sevenguis.crudng"
        minSdkVersion 17
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable 'InvalidPackage'
    }
   // Change start
    applicationVariants.all {
        javaCompile.options.compilerArgs.addAll(
                '-processorpath', configurations.apt.asPath,
                '-processor', 'com.github.mttkay.memento.MementoProcessor'
        )
    }
   // Change end
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.jakewharton:butterknife:6.0.0'
    // Change start
    compile 'com.github.mttkay.memento:memento:0.2'
    apt 'com.github.mttkay.memento:memento-processor:0.2'
    // Change end
}

Butterknife stops working, i.e. I get a nullpointer exception when calling a method on an injected view.

I found a somewhat similar question on stackoverflow but the solution there doesn't help. Do you have any idea how to solve my issue?

IgorGanapolsky commented 9 years ago

Hi, have you found a solution to this problem? I'd like to avoid this issue in my code...

eugenkiss commented 9 years ago

I haven't looked into it since I created this issue report so sadly not.

IgorGanapolsky commented 9 years ago

I think the project creator is not actively supporting it anymore...

On Fri, Feb 13, 2015 at 3:44 PM, Eugen Kiss notifications@github.com wrote:

I haven't looked into it since I created this issue report so sadly not.

— Reply to this email directly or view it on GitHub https://github.com/mttkay/memento/issues/12#issuecomment-74323687.