android-annotations

AndroidAnnotations Rest SourceHttpMessageConverter error

只谈情不闲聊 提交于 2019-12-25 02:55:26
问题 I'm trying to use the RestClient of AndroidAnnotations but when I call one of the methods in the client I get the following error: 04-10 10:07:23.624 7528-7528/eu.shareforce.vitens E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.VerifyError: org/springframework/http/converter/xml/SourceHttpMessageConverter at org.springframework.web.client.RestTemplate.<init>(RestTemplate.java:149) at eu.shareforce.vitens.Interfaces.VitensRestClient_.<init>(VitensRestClient_.java:23) at eu.shareforce.vitens

Android Annotations with Kotlin and build tools 2.3.0

旧时模样 提交于 2019-12-24 19:24:45
问题 To use Android Annotations prior to 2.3.0 a person would do this: dependencies { apt "org.androidannotations:androidannotations:$AAVersion" compile "org.androidannotations:androidannotations-api:$AAVersion" } to use Kotlin you would use kapt instead of apt (link). Since 2.3.0 a person needs to use the annotationProcessor instead of apt: annotationProcessor "org.androidannotations:androidannotations:$AAVersion" compile "org.androidannotations:androidannotations-api:$AAVersion" Does anyone know

Unable to execute dex: Multiple dex files define Lorg/apache/maven/artifact/Artifact

情到浓时终转凉″ 提交于 2019-12-24 13:29:53
问题 I have an Android project with Robolectric. My application related classes are placed in src/main/java and test related classes in src/test/java . I have these test dependencies in my pom.xml <dependency> <groupId>org.robolectric</groupId> <artifactId>robolectric</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> When building and deploying from console with mvn package android:deploy everything

Rest client logging for AndroidAnnotations

淺唱寂寞╮ 提交于 2019-12-24 10:41:34
问题 I am attempting to use AndroidAnnotation's rest client to access a web service. I am receiving the following error: org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unexpected character ('f' (code 102)): was expecting double-quote to start field name How can I make the rest client log the actual response it received? I can't imagine why my web service is returning this response, but I can't debug it unless I can see the full response. Do I have to set

java.lang.IllegalArgumentException: No injector factory bound for Class<MyActivity_>

人走茶凉 提交于 2019-12-23 08:54:03
问题 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 subtype? As I understand it happens because I am using an AndroidAnnotations library. AppComponent.class : @Singleton @Component(modules = { AndroidInjectionModule.class, AppModule.class, ActivityBindingModule.class }) public interface AppComponent extends

Android Annotations + multiple paths to APT

隐身守侯 提交于 2019-12-23 05:48:14
问题 imagine some proyect like this one that use android-annotations and for this work i have to put this in build.gradle apt { arguments { resourcePackageName "com.pandaos.smartconfig" androidManifestFile variant.outputs[0].processResources.manifestFile } } where: resourcePackageName "com.pandaos.smartconfig" its the path where code its annotated... the config for plugin android-apt apply plugin: 'com.neenbedankt.android-apt' I suppose, that plugin "invoke" some task to generate the code that

Setting date using DialogFragment and Android Annotations

坚强是说给别人听的谎言 提交于 2019-12-23 02:48:16
问题 I have problem with writing date I selected in DatePicker with Dialog Fragment. I`m trying to do this using Android Annotations. Problem is, I have to implement behavior for setting this date to TextView on OnDateSet function in DatePickerFragment class. How can I choose in which TextView, which @Click should write? Code below: @EActivity(R.layout.activity_main_search)public class SearchActivity extends FragmentActivity{ private int mFYear, mFMonth, mFDay, mTYear, mTMonth, mTDay; (R.id.main

Android annotations REST set header

笑着哭i 提交于 2019-12-22 17:54:11
问题 I'm using Android annotations, and recently discovered a bug Spring Rest Template usage causes EOFException which I don't know how to fix using annotations. I have post request: @Post("base/setItem.php") Item setItem(Protocol protocol); Now, how do I set header headers.set("Connection", "Close"); to this request? Thanks! 回答1: Two solutions : Solution 1 since AA 3.0 (still in snapshot), you can use interceptors field on @Rest annotation and implement a custom ClientHttpRequestInterceptor which

Android annotations and applicationIdSuffix

五迷三道 提交于 2019-12-22 04:14:19
问题 I'd been trying out Android annotations recently and everything had been working well until I decided to add applicationIdSuffix in buildTypes in my build.gradle file. Currently it looks like this: buildTypes { debug { applicationIdSuffix '.debug' } ... } And upon compiling I get the following log in gradle console: :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:pre_testBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE

Can't make project in AndroidStudio with AndroidAnnotations library

Deadly 提交于 2019-12-22 01:43:45
问题 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 a downloaded Gradle 2.1 binary. I am using Ubuntu 14.04 . The gradle compilation process says that I am missing a copy of AndroidManifest.xml at a given location (please, see the output below) though I've found it when navigating into this folder