码迷,mamicode.com
首页 > 移动开发 > 详细

AndroidStudio 添加AndroidAnnotations

时间:2015-04-13 19:04:43      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:gradle   apt   

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‘
    }
}

AndroidStudio 添加AndroidAnnotations

标签:gradle   apt   

原文地址:http://blog.csdn.net/fangchao3652/article/details/45028387

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!