Android Talker(3)Go on with the REST Sample with Real Device
Android Talker(3)Go on with the REST Sample with Real Device
Eclipse Error Message: Errors occurred during the build.
Errors running builder 'Maven Project Builder' on product 'xxxxx'.
java.lang.NullPointerException
Solution: I do not know why there are 2 maven dependency plugins in my STS, so I try to remove the project configuration.
Click the project and choose:
Maven ----> Disable Maven Dependencies
Maven ----> Disable Maven Nature
After remove 2 maven dependencies, and then add the first maven dependency back.
And we need to make sure we add android path to our eclipse:
Run Configuration -----> Envrionment ---->
ANDROID_HOME /opt/android-sdk
SDK_ROOT /opt/android-sdk/tools
I will go on to learn the projects spring-android-showcase-client, spring-android-showcase-server.
Error Message: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
Solution: Add these converter
<beanid="handlerAdapter"class="com.sillycat.easygroovyplugin.servlet.proxy.ProxyAwareAnnotationMethodHandlerAdapter"]]> <propertyname="messageConverters"]]> <list]]> <refbean="jsonConverter"/> </list]]> </property]]> </bean]]>
<beanid="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"]]> <propertyname="supportedMediaTypes"value="application/json"/> </bean]]>
I changed my easyrestserver side to use groovy controller, velocity for view.
I changed my EasyRestClientAndroid working with both get all persons and get one person.
I am using maven on my eclipse, so my command will be
clean install android:deploy android:run
references: http://developer.android.com/training/index.html
http://www.mkyong.com/spring-mvc/spring-3-mvc-contentnegotiatingviewresolver-example/