Android aar stopped building with extractDebugAnnotations com / intellij / psi / PsiJavaFile android

My build recently stopped working for the open source gradle / android project. They worked perfectly until today (October 10, 2016). I run the build matrix for several versions (on travis) from gradle and the Android w861 plugin. Essentially, it now fails on gradle 3.0 and 3, as with the gradle android 2.2.0 plugin. Other versions using different plugins for Android are fine. This is only the 2.2.0 plugin that does not work.

The part that puzzles me is the error message

:hello-world-aar:preBuild UP-TO-DATE :hello-world-aar:preDebugBuild UP-TO-DATE :hello-world-aar:checkDebugManifest :hello-world-aar:preDebugAndroidTestBuild UP-TO-DATE :hello-world-aar:preDebugUnitTestBuild UP-TO-DATE :hello-world-aar:preReleaseBuild UP-TO-DATE :hello-world-aar:preReleaseUnitTestBuild UP-TO-DATE :hello-world-aar:prepareOrgOsmdroidOsmdroidAndroid541ReleaseLibrary :hello-world-aar:prepareDebugDependencies :hello-world-aar:compileDebugAidl :hello-world-aar:compileDebugNdk UP-TO-DATE :hello-world-aar:compileLint :hello-world-aar:copyDebugLint SKIPPED :hello-world-aar:compileDebugRenderscript :hello-world-aar:generateDebugBuildConfig :hello-world-aar:generateDebugResValues :hello-world-aar:generateDebugResources :hello-world-aar:mergeDebugResources :hello-world-aar:processDebugManifest :hello-world-aar:processDebugResources :hello-world-aar:generateDebugSources :hello-world-aar:incrementalDebugJavaCompilationSafeguard :hello-world-aar:compileDebugJavaWithJavac :hello-world-aar:compileDebugJavaWithJavac - is not incremental (eg outputs have changed, no previous execution, etc.). :hello-world-aar:extractDebugAnnotations FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':hello-world-aar:extractDebugAnnotations'. > com/intellij/psi/PsiJavaFile 

Again, this is in the Android Archive (AAR) project. I have searched and cannot find much in this class. It is not mentioned anywhere in my code. My best guess: Google has changed the support library or something that broke something. I also build from the command line through travis. I have no idea where the intelligent material comes from.

+5
source share
3 answers

fixed by clearing cache with:

 rm -rf ~/.gradle/caches/ 
+2
source

This has been fixed in accordance with https://code.google.com/p/android/issues/detail?id=224910 . You can rebuild your project using the gradle command line after the clear gracle cache locally (rm -rf ~ / .gradle / caches /)

In addition, you need the same operation for your CI agent.

+1
source

I ran into the same problem. The problem in my project was an empty IntDef. If clearing the gradle cache does not work, check to see if you have an empty Def in your code and delete them.

@IntDef({}) or @StringDef({}) ...

+1
source

Source: https://habr.com/ru/post/1257999/


All Articles