Question

Is it possible to use AndroidAnnotations with the Scala programming language and the Gradle build system? When I try to integrate AndroidAnnotations into my existing Android/Scala/Gradle project, then compilation fails because the generated underscore classes (e.g. MyActivity_) cannot be found.

Here are some useful starting points and references:

Was it helpful?

Solution

During my quest to solve this problem, I added some research links to my original question post. The AndroidAnnotations annotation processor generates source code (Java files). Annotation processors in general seem to operate at the source code level (and not class files). I am expecting AndroidAnnotations to generate Java code from Scala source files. Scala doesn't seem to support the Java annotation processing tool. So my answer to this question would be: it is not possible to use AndroidAnnotations with Scala source code. However, AndroidAnnotations may still be used in the Java source code in a Scala mixed-source project.

OTHER TIPS

Regarding Gradle (without Scala), it seems that someone managed to use it with AndroidAnnotations, here: Adapt AndroidAnnotations Maven settings to Gradle

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top