最近可能又要开始接触android了,去了解了一下,更新换代还是挺快的
AndroidAnnotations更新到3.3.1版本了,也去看了一下Android Studio(1.2版本的下站地址,需翻墙)
下了那个IDE+SDK版本的,但是安装之后还是会去检查SDK版本
安装的时候遇到了一些问题:
- Intel HAXM安装失败,原因是BIOS里没有开启Intel Virtualization Technology
- JDK需要1.7以上
- 配置Androidannotations
全局gradle文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
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
}
}
allprojects {
repositories {
jcenter()
}
}
应用的gradle文件(provided fileTree(dir: 'libs', include: ['*.jar'])将compile改成了provided防止包冲突)
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = '3.3.1'
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
//androidManifestFile variant.processResources.manifestFile
resourcePackageName 'com.example.kiyon.myapplication'//此处填写你自己的包名
}
}
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
defaultConfig {
applicationId "com.example.kiyon.myapplication"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
apt "org.androidannotations:androidannotations:$AAVersion"
provided fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile "org.androidannotations:androidannotations-api:$AAVersion"
}
下载了一个汉化包,可以使用(PS设置功能无法使用,故删除了)
先用用看吧Good Luck!