android-annotations

java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy after moving to Android Annotations v.2.7

≯℡__Kan透↙ 提交于 2019-12-12 10:57:06
问题 I've got problems with building my project in eclipse after moving to Android Annotations v.2.7, at the same time maven build is ok. Here is stacktrace from eclipse Error log: Error Mon Nov 05 15:49:49 GMT+02:00 2012 Errors running builder 'Java Builder' on project 'heroes'. java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser

@AfterViews is equivalent to onCreate or onPostCreate?

末鹿安然 提交于 2019-12-12 09:59:39
问题 About Android Annotations, @AfterViews is equivalent to onCreate or onPostCreate? or what is the annotation equivalent for each one? can i remove "onCreate" and "onPostCreate" methods and put my whole code of both in the same method with @AfterViews? 回答1: In annotated Activity s, the @AfterViews annotated methods are called in onCreate() . In annotated Fragment s, the @AfterViews annotated methods are called in onViewCreated() . If you do not want to do initialization before views are created

Getting Android Studio, Gradle and Android Annotations working together

耗尽温柔 提交于 2019-12-12 08:44:05
问题 now that i've decided to use Android Annotations with Android Studio i wanted to implement it through Gradle. After some thoughtful research i've found out that there are older and newer ways of implementing Android Annotations through Gradle depending on which version android studio, gradle or android annotations have. i came to this useful tutorial -> http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/ , and tried to implement this , at first, with the new 'android

Android - jmdns doesn't discover devices

若如初见. 提交于 2019-12-12 07:09:22
问题 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 service info (it returns null for some reason). Turns out it's a known problem... So now I'm trying to work with jmDNS, which doesn't seem to find services at all. here's my class (I'm working with the AndroidAnnotations framework) MDnsHelper:

How to tell Junit/Mockito to wait for AndroidAnnotations to inject the dependenices

左心房为你撑大大i 提交于 2019-12-12 03:44:44
问题 I am using AndroidAnnotations in my project and I want to test a presenter. The test suite runs and @Test methods are apparently called before the injection has finished, because I get NullPointerException whenever I try to use the `LoginPresenter in my test code. @RunWith(MockitoJUnitRunner.class) @EBean public class LoginPresenterTest { @Bean LoginPresenter loginPresenter; @Mock private LoginView loginView; @AfterInject void initLoginPresenter() { loginPresenter.setLoginView(loginView); }

Android setting AndroidAnnotations using gradle at AndroidStudio not show layout

北城余情 提交于 2019-12-12 01:57:48
问题 I am learning the gradle and AndroidAnnotations framework in the android studio. But I encounter the problems at the initial...= = I create a new project using android studio . Then I put the dependences about the AndroidAnnotations. My app.gradle all below apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "yu.idv.androidannotationtest" minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" }

Android Annotations with Tabs + Viewpager Giving Nullpointer Exception

喜你入骨 提交于 2019-12-11 23:26:14
问题 I created a simple android project in Android Studio using navigation type Tabs + Viewpager. The code compiles and runs OK. But after i included android annotations, i get a null pointer exception for the viewPager object. The Code is as follows: MainActivity.java; package com.example.tabnanot; import java.util.Locale; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager;

Class Load Exception when using @RestService - java.lang.ClassNotFoundException (…) at dalvik.system.BaseDexClassLoader.findClass

我怕爱的太早我们不能终老 提交于 2019-12-11 07:33:56
问题 So my project is compiling and running well unitll I inject AndroidAnnotations @RestService into my MainActivity @EActivity(R.layout.activity_main) public class MainActivity extends AppCompatActivity { @RestService RestInterface restInterface; ... } MyRestClient: @Rest(rootUrl = "http://153.19.215.46:8080/api", converters = {MappingJackson2HttpMessageConverter.class}) public interface RestInterface { @Post("/device/rgbled/light") String lightLed(@Body String color); } Some sources led me to

Android Annotations, Parcelable object as Extra, producing IllegalArgumentException: is not a constant in android.text.Layout$Alignment

大兔子大兔子 提交于 2019-12-11 07:32:29
问题 I've got a class that is Parcelable and its data members are made up of Strings, Integers, Booleans, Dates, and other Parcelable objects which are made up of the same kinds of things. At the end of the tree though, it's only Strings, Integers, Booleans, and Dates (java.util.Date). I have an @EActivity with an @Extra called entity that is one of these Parcelable objects. I have an @EFragment with an @FragmentArg called entity as well. When I launch the Activity, I pass the entity along to the

AndroidAnnotations Rest view response data

隐身守侯 提交于 2019-12-10 18:53:43
问题 I am doing an API call using the Android Annotations RestService. The only problem is that I receive a JSON but I don't know how to see that JSON string. Is there a way I can view the response data so I can see the JSON string/content? I tried using an ClientHttpRequestInterceptor but that only shows data of the request to the server and not the response. 回答1: Create this interceptor: public class LoggingInterceptor implements ClientHttpRequestInterceptor { @Override public ClientHttpResponse