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‘
}
}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。