首页  »   Android

AndroidStudio 平添AndroidAnnotations

网友分享于:2015-04-14  浏览:0次
AndroidStudio 添加AndroidAnnotations

1.在project的gradle文件中

dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

2.在module的gradle文件中:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile files('libs/wmqtt.jar')
    compile files('libs/gson-2.2.4.jar')
    compile files('libs/org.eclipse.paho.client.mqttv3-1.0.2.jar')
    apt "org.androidannotations:androidannotations:3.2"
    compile 'org.androidannotations:androidannotations-api:3.2'
    compile 'com.android.support:recyclerview-v7:21.0.3'
    compile 'com.android.support:cardview-v7:21.0.3'
    compile 'com.facebook.fresco:fresco:0.2.0'
}
apt {
    arguments {
        androidManifestFile variant.outputs[0].processResources.manifestFile
        resourcePackageName 'com.example'
    }
}

相关解决方案

最新解决方案