When trying to define a rest template using the #Rest annotation, and when providing one or more "converters" in that annotation, I receive the following compile error:
The converter class must be a subtype of org.springframework.http.converter.HttpMessageConverter
When, in fact, I have tried to pass in GsonHttpMessageConverter.class and MappingJacksonHttpMessageConverter.class which are both such subtypes.
I have the following libraries included in my /libs directory
androidannotations-api-2.7.1.jar
gson-2.2.4.jar
jackson-core-asl-1.9.12.jar
jackson-mapper-asl-1.9.12.jar
spring-android-auth-1.0.1.RELEASE.jar
spring-android-core-1.0.1.RELEASE.jar
spring-android-rest-template-1.0.1.RELEASE.jar
I'm not sure if this is an issue with AndroidAnnotations or with my own setup, but help would be appreciated.
I had the same problem but I solved it. Only change my Eclipse. I was using Helios with Android Development Toolkit
Now I dowload The Android SDK than includes Eclipse + ADT plugin. Use my old workspace with my proyect and all work fine!!!.
Hello its too late for answer but could be helpfull for others also who are searching for the same use Below code snippets for your problem:-
#Rest(rootUrl = BASE_URL, converters = {ByteArrayHttpMessageConverter.class,
FormHttpMessageConverter.class, StringHttpMessageConverter.class})
it is working for image as well and string params as well
Related
I'm trying to create in Xamarin Android the Jitsi Bindings Library. I've got all the dependecies aar (66 items) by following this guide:
https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk
(Maven repository https://github.com/jitsi/jitsi-maven-repository/raw/master/releases)
And this is the result so far: it is missing JitsiMeetActivity
Any help? Thanks
to generate the JitsiMeetActivity class, add the 'XamarinLibrary.Xamarin.Android.Facebook.React.ReactNative' nuget to the binding project and rebuild it.
I have the same issue..
It seems that the binding process misses all the classes that extend from a base class...
as an example try also looking for the JitsiMeetActivityInterface interface definition, its a really simple class but its also missing from the binding process as well as a few others.
Happy to work with you on this too if you like.
Im building a simple game with Xamarin/Cocossharp in a Shared Project.
I added some physics with Box2D and everything works well on WP8.1.
I import Box2D and i access to the methods and class provided without problem on Windows Phone, but when i try to compile it for Android it says that the type or namespace "Box2D" could not be found. Intellisense doesn't shows any error...
error output
I'm new to game dev and also to VS2015 so it may be something simple but i dont understand what I'm missing here.
Thanks in advance
After struggling around with this i managed to fix this:
As pointed out from Sven-Michael in his answer the solution was to install:
CocosSharp.PCL.Shared
from NuGet. In my case was only necessary to add the reference to the Box2D.DLL file contained into the package.
The reason why it was not working for me it's probably that because of trying to solve this problem I've messed up whit my solution and caused other problems. So I created a new Project from skratch and I've imported my source code again.
Ensure that you have installed CocosSharp.PCL.Shared to your Android project.
E.g. via PM-Comsole:
Install-Package CocosSharp.PCL.Shared
But it can be installed via NuGet, too. This will add box2d and some other dependencies automatically.
I have been using ButterKnife successfully to inject views in my application like so:
#InjectView(android.R.id.text1)
TextView mMessageText;
#InjectView(android.R.id.button1)
ImageView mButton;
... then later...
View.inflate(ctx, R.layout.layout_message_with_button, this);
ButterKnife.inject(this);
mMessageText.setText("Some Text");
This morning I integrated MonkeyTalk for some testing, and my injections now seem to be busted. I've removed/readded annotation processing for ButterKnife, but that didn't seem to fix the problem. Using findViewById fixed the issue (the views were found), but changing the project to use findViewById directly isn't really an option at this point.
I wasn't able to find any information about conflicts between the libraries (or using AspectJ with ButterKnife in general), so hopefully someone here can help provide some insight into what I might be doing wrong (or if they are just in general incompatible).
I am using ButterKnife 4.0.1 and MonkeyTalk Agent 2.0.9
UPDATE:
I have also tried changing the build order of the libraries in the Eclipse project properties, but this also doesn't seem to help.
UPDATE:
I narrowed it down to the generated files not being created in ButterKnife. It appears to be related to Annotation processing not happening in the org.eclipse.ajdt.core.ajbuilder. When I add org.eclipse.jdt.core.javabuilder to the .project as suggested here : https://bugs.eclipse.org/bugs/show_bug.cgi?id=169857, the classes are generated, but I'm getting NoClassDefFoundError at run time on .ajc files. Any idea how to get the annotation processor to run in the ajbuilder? That seems to be the correct solution for my problem.
UPDATE:
From this post (http://andrewclement.blogspot.ca/2014/08/annotation-processing-in-ajdt.html), it appears that Aspects and Annotations can be processed in the same project using Eclipse 4.4. It seems, however, that the combination of ADT 23 + Eclipse 4.4 + AspectJ is pretty unstable (and doesn't appear to generate the code from ButterKnife's Annotations anyway). Anyone know if Android Studio would be any help here?
UPDATE:
I converted my project to Android Studio and it looks like both the Aspects and the Annotations are working. I know I'm still not doing something right with the Aspects, since they weren't processing until I added Jake Wharton's Hugo library to the Android project.
i need a help with using Gson library. I made a build path and imported it into my class, but when i initialize the Gson object i get an NoClassDefFoundError. I also tryed to download some other versions but didnt helped. Now using 2.2.4.
Thanks in advance!
Try this
Right click on project
Properties
Java Build Path
Order And Export
Check all dependencies
Clean and Build
Now Run your project
Here is a guide that could help you. Its explains how to setup and use GSON.
Use GSON to work with JSON in your Android apps
To add support of GSON on android studio, just add line below to app build.gradle file.
compile 'com.google.code.gson:gson:2.7'
By now 2.7 is last current available version according to: https://mvnrepository.com/artifact/com.google.code.gson/gson
Please check this repository to be sure you are using last available version.
I'm new to Android and OpenCV, and I try to follow this simple tutorial. I got stuck at implementation of CvViewFrameListener2 interface:
Defines that your activity implements CvViewFrameListener2 interface and fix activity related errors by defining missed methods.
Eclipse shows an error, that the CvFrameListener2 cannot be resolved to a type. It seems like this interface doesn't exist in the library.
I load OpenCV4Android version 2.4.5. Can anybody help me?
I m sure this is late. But I faced this problem too, here my workaround
make sure you have imported the openCV sdk as a library project and linked to your project.
Hope this help
also I used this project from github for face recognition face recognition
and this link to download OpenCV 2.4.6 android sdk
http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.6/OpenCV-2.4.6-android-sdk-r2.zip/download