Questions tagged [android-annotations]

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code that is easy to maintain.

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code.

  • This tag should contain questions related to the AndroidAnnotations framework
  • This tag should not contain general java annotation related questions, or annotation processing questions
  • This tag should not contain questions related to the Android Support Annotations library

Please start by reading the wiki and the mailing list

496 questions
5
votes
1 answer

Android Studio with AndroidAnnotations -> these types will not undergo annotation processing

I am not sure if it is Android Studio ( 0.1.9 ) or AndroidAnnotation problem, however, lately I cannot make and compile my AndroidAnnotations projects. Ok, so I try to make project and this is what I got in "Messages" window: Information:Round…
outlying
  • 578
  • 1
  • 8
  • 19
5
votes
4 answers

Activity not found with AndroidAnnotations

Hi i've added the AndroidAnnotations and configured it; it generates the activity with the underscore _ as suffix, but when I try to lunch the app, it gives this error 05-26 04:17:23.524: E/AndroidRuntime(5096): java.lang.RuntimeException: …
neoshadybeat
  • 51
  • 1
  • 4
5
votes
2 answers

AndroidAnnotations processing fails in IntelliJ because R.java isn't generated

I think there's some problem with IntelliJ when it generates the R.java file, which leads to a problem in AndroidAnnotations because it can't resolve the resource id for my layout. Here's my activity: package com.airlocksoftware.canvastest; import…
liftdeadtrees
  • 441
  • 1
  • 4
  • 16
5
votes
2 answers

Gson serialization error class com.activeandroid.DatabaseHelper declares multiple JSON fields named mContext

The error im getting is "java.lang.IllegalArgumentException: class com.activeandroid.DatabaseHelper declares multiple JSON fields named mContext" I am using AndroidAnnotations RestClient to pull data from my Web Service and serialize into POJOs. The…
Darussian
  • 1,573
  • 1
  • 16
  • 28
4
votes
2 answers

Adapt AndroidAnnotations Maven settings to Gradle

Is it possible to adapt AndroidAnnotations Maven setup into Gradle? http://code.google.com/p/androidannotations/wiki/MavenEclipse I can't seem to make it work I keep getting com.sun.codemodel#codemodel;2.5-FROZEN-AA: not found So far I have…
billy
  • 61
  • 3
4
votes
1 answer

Java Annotation Processing how to check if VariableElement is a primitive type(int, float) or an object some class

I have a class public class SomeClass { @CustomAnnotation1 String stringProperty = "LALALA"; @CustomAnnotation1 int integerProperty; @CustomAnnotation1 ClassObject classObject; } CustomAnnotation1 is a custom annotation…
4
votes
0 answers

Unable to build Android project in Android Studio 3.1 using Gradle 3.0.0

Firstly, I am totally new to Android platform so please excuse me if I am committing any mistake. I am trying to build an android project using Gradle 3.0.0 version and using Google Android annotations api. Below is my project build.gradle file //…
4
votes
2 answers

How to use AndroidAnnotation @SharedPref with Kotlin

I'm trying to use AndroidAnnotations @SharefPref within kotlin, but Iget following error org.androidannotations.annotations.sharedpreferences.Pref can only be used on an element that extends…
longi
  • 11,104
  • 10
  • 55
  • 89
4
votes
2 answers

AndroidAnnotations and Dagger 2

I'm reading about Dependency Injections and found 2 libs that get my attention, AndroidAnnotations and Dagger 2. What I saw is that AA has a lot of functionalities including DI, but most of the developers are using Dagger 2 for DI. I was wondering…
4
votes
3 answers

Android: NullPointerException despite @NonNull

I'm using annotations to ensure that parameter will be not null, assuming this would cause compiler check. public @Nullable ApplicationAccount accountForKey(@NonNull String key) { return accounts.get(key); } However, by running this code I…
4
votes
2 answers

Android NetworkOnMainThreadException in Background Methods

I have some network requests in my app, and whenever the network related code is called, I got this exception. I already put them in background: @Background protected void getBitmapFromURL(String src, ImageView img) { try { …
J Freebird
  • 3,664
  • 7
  • 46
  • 81
4
votes
0 answers

Android annotations ClassCastException typeElement

I just got a java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.TypeElement when I try to build my project, I am using the latest versions of support libraries and annotations and I've…
4
votes
1 answer

Do Dagger 2 and Android Annotations work together?

I've read here that Android Annotations has been updated to work with Dagger (1), but I am not sure if it automatically applies to Dagger 2 as well. Does anybody use AA and Dagger 2 together? Thanks.
levavare
  • 494
  • 1
  • 4
  • 13
4
votes
1 answer

When I apply AspectJ to Android project with Androidannotations not work

I'm using Androidstudio 0.8.9 and build with gradle. I was using Android-Annotations and works well. And I want use AspectJ also, so apply plugin(https://github.com/uPhyca/gradle-android-aspectj-plugin). But compile fail, and throw some error…
Flask_KR
  • 269
  • 1
  • 6
  • 14
4
votes
2 answers

AndroidAnnotations Eclipse configuration with ADT 23

Since ADT 23, there seems to have no way to add Annotation Processor Factory Path to projects: No "Annotation Processing" item in Poject>Properties>Java Compiler. Does anyone know how to add androidannotations-X.X.X-api.jar to the annnotaions…
Thomas G.
  • 882
  • 9
  • 10