thoutbeckers / Injctr

Injctr provides runtime Injection for Android Resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

llegalArgumentException in InjctrUtil when targeting lollipop

manholok opened this issue · comments

When I try to get the new roboguice with the new appcomat-v7: 21.+ running...

InjctrUtil.java
line 357:

Caused by: java.lang.IllegalArgumentException: not a primitive field
            at java.lang.reflect.Field.getIField(Native Method)
            at java.lang.reflect.Field.getInt(Field.java:438)
            at houtbecke.rs.injctr.InjctrUtil.getStyleable(InjctrUtil.java:357)
            at houtbecke.rs.injctr.InjctrUtil.getStyleable(InjctrUtil.java:333)
            at houtbecke.rs.injctr.InjctrUtil.injctr(InjctrUtil.java:148)
            at houtbecke.rs.injctr.InjctrUtil.injctrActivity(InjctrUtil.java:120)
            at houtbecke.rs.injctr.base.RoboInjctrActionBarActivity.afterContentView(RoboInjctrActionBarActivity.java:38)

this is my gradle in Injctr:

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {

        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
//    compile 'com.android.support:appcompat-v7:+'
//    compile fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
    compile 'com.android.support:appcompat-v7:21.+'
    compile 'org.apache.commons:commons-lang3:3.1'
    compile 'javax.inject:javax.inject:1'
    provided ('org.roboguice:roboguice:3.0.1') {
        exclude group:"aopalliance"
        exclude group:"cglib"
        exclude group:"org.ow2.asm"
        exclude group:"asm"
    }

}