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
113
votes
5 answers

RequiresApi vs TargetApi android annotations

Whats the difference between RequiresApi and TargetApi? Sample in kotlin: @RequiresApi(api = Build.VERSION_CODES.M) @TargetApi(Build.VERSION_CODES.M) class FingerprintHandlerM() : FingerprintManager.AuthenticationCallback() NOTE:…
63
votes
8 answers

Dagger and Butter Knife vs. Android Annotations

I am evaluating Dependency Injection (DI) frameworks for an Android app. The top contenders are: Dagger (with Butter Knife) and Android Annotations. I understand that Dagger and ButterKnife are from the same source- square and they complement each…
46
votes
4 answers

Enums and android annotation intDef

I have an enum: public enum AppEnums { SERVICE_ERROR, CONNECTION_ERROR; } and I want to use it in an intDef of Android Annotation: @IntDef({AppEnums.CONNECTION_ERROR, AppEnums.SERVICE_ERROR}) public @interface ServiceErrors { } error…
AliSh
  • 10,085
  • 5
  • 44
  • 76
37
votes
4 answers

Spring Rest Template usage causes EOFException

I'm receiving java.io.EOFException's when using Spring REST template on Android. The stacktrace cause reads like this: Caused by: java.io.EOFException at libcore.io.Streams.readAsciiLine(Streams.java:203) at…
Sebastian Roth
  • 11,344
  • 14
  • 61
  • 110
21
votes
0 answers

Android Support Annotation "should have @Retention(RetentionPolicy.SOURCE)"

I am using the @Retention and @StringDef annotations for some of my methods in a library and I face a strange warning, I want to understand. In a static class, SIP, I use this annotation: public static final String CODEC_SPEEX_16K =…
Grisgram
  • 3,105
  • 3
  • 25
  • 42
19
votes
2 answers

Android - jmdns doesn't discover devices

I'm trying to implement a class to discover services on the network. I've tried working with Android's NSD and it does discover the services fine, but it supports only API levels 16 and up, and I can't seem to retrieve the txtRecord field within the…
orenk86
  • 720
  • 9
  • 24
19
votes
6 answers

Android Studio: Use AndroidAnnotations

So I wanted to try the new Android Studio and imported my eclipse projects (I generated a gradle build file). Worked pretty good. The only library which does not seem to work is AndroidAnnotations. I selected the androidannotations-2.7.jar file…
Basic Coder
  • 10,882
  • 6
  • 42
  • 75
16
votes
2 answers

Can't make project in AndroidStudio with AndroidAnnotations library

I've looked at several discussions and blogs about compiling Android Applications in Android Studio with AndroidAnnotations framework specially this one, but none of them helped me to get started. I am using Android Studio 0.8.9 and I am pointing on…
loloof64
  • 5,252
  • 12
  • 41
  • 78
16
votes
3 answers

Integrating AndroidAnnotation with Intellij IDEA 12

I can't configure my IDE (Intellij IDEA 12) to work with AndroidAnnotations (http://androidannotations.org/) previous configurations screenshots differ from the new ide that jetbrains just released. Can somebody give me a step by step…
Kevin Antonio
  • 578
  • 3
  • 13
14
votes
1 answer

Is "AndroidAnnotaions" reliable?

Is "AndroidAnnotations" reliable? I've searched it but couldn't find many articles on it(reviews or tutorials). I've been considering using this library in my project which already has quite lots of users. Before adopting it, I need a good…
eunjae.lee
  • 155
  • 7
14
votes
2 answers

java.lang.IllegalArgumentException: No injector factory bound for Class

The error I have is following: Caused by: java.lang.IllegalArgumentException: No injector factory bound for Class. Injector factories were bound for supertypes of MyActivity_: [MyActivity]. Did you mean to bind an injector factory for the…
aleksandrbel
  • 1,422
  • 3
  • 20
  • 38
14
votes
1 answer

Android @Intdef for flags how to use it

I am not clear how to use @Intdef when making it a flag like this: @IntDef( flag = true value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS}) this example is straight from the docs. What does this actually mean ? …
j2emanue
  • 60,549
  • 65
  • 286
  • 456
14
votes
1 answer

Gradle + Annotations + Flavors = won't run annotations processor

I have a Gradle build script that is using an annotations processor (Android Annotations) to generate code. Building was fine until I added a new Pro Flavor. I can build the Free flavor but when I build the Pro flavor the annotations processor…
14
votes
5 answers

ClassNotFoundException on AndroidAnnotations generated classes since update to ADT 22

This project worked wonders before updating to ADT22. I already lost a day because of not knowing I had to download build tools, and I'm afraid I'm going to loose another one because of this. When I try to build the same code that was working two…
13
votes
4 answers

Android Annotations: Annotated class Xyz_ not finding it's original ("cannot find symbol class Xyz")

I use the latest Android Annotations 2.6 and IntelliJ IDEA. Sometimes I always keep having problem with the annotations / classpath / compilation order. Seems to occur irregularly. I had the project compile earlier today, then changed a…
Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
1
2 3
33 34