targetSDKversion “android-L” + compileSdkVersion 20 + buildToolsversion “20.0.0”
直到我试着用它
targetSDKversion 20 + compileSdkVersion 20 + buildToolsversion “20.0.0”
并且
targetSDKversion 19 + compileSdkVersion 19 + buildToolsversion “19.1.0”.
每次我得到2个警告,我的java类似乎没有得到预编译.即使它似乎预先创建了build / generated / source / apt目录.但没有我的MainActivity预处理类 – >主要活动_
我总是得到以下警告:
Note: Resolve log file to D:\AndroidProjects\GradleTest\app\build\generated\source\apt\androidannotations.log
Note: Initialize AndroidAnnotations 3.0.1 with options >{androidManifestFile=D:\AndroidProjects\GradleTest\app\build\intermediates\manifests\debug\AndroidManifest.xml,resourcePackageName=at.gradle.defuex.gradletest}warning: Unclosed files for the types ‘[dummy1407928544078]’; these types will not undergo annotation processing
warning: The following options were not recognized by any processor: ‘[androidManifestFile,resourcePackageName]’
我的build.gradle文件如下所示:
buildscript{
repositories{
mavenCentral()
}
dependencies{
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3'
}
}
repositories{
mavenCentral()
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 19
buildToolsversion "19.1.0"
defaultConfig {
applicationId "at.gradle.defuex.gradletest"
minSdkVersion 10
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
signingConfigs{
releaseConfig{
storeFile file("gradlekeystore.jks");
storePassword ("*************");
keyAlias "keyAlias";
keyPassword "*************";
}
}
buildTypes {
release {
runProguard false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
signingConfig signingConfigs.releaseConfig
}
debug {
debuggable true
applicationIdSuffix ".debug"
}
}
}
apt {
arguments {
androidManifestFile variant.processResources.manifestFile
resourcePackageName "at.gradle.defuex.gradletest"
}
}
dependencies {
apt "org.androidannotations:androidannotations:3.0+"
compile "org.androidannotations:androidannotations-api:3.0+"
compile filetree(dir: 'libs',include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.+'
}
我使用以下版本:
> Android Studio版本0.8.2
> Gradle版本0.12.2
> android-apt版本1.3
> android annotations版本3.0.1(如build.gradle文件中所示)
- If there should be a solution to this problem please tell me,because im confused Now.
- If there should be a better annotations framework or a way of using cool annotations,please tell me that too.
- And if it should not be a common way anymore to use annotations for android projects anyway,please pleeeeease tell me that too.
,但我更喜欢解决我的问题:)
干杯!