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.
,但我更喜欢解决我的问题:)
干杯!
解决方法 尝试从项目根目录运行gradlew clean build. 然后在设备上运行之前尝试制作项目(带有绿色箭头0和1的按钮).应该没事. 总结以上是内存溢出为你收集整理的让Android Studio,Gradle和Android Annotations协同工作全部内容,希望文章能够帮你解决让Android Studio,Gradle和Android Annotations协同工作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)