Android Talker(3)Go on with the REST Sample with Real Device
16lz
2021-01-23
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/
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/
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer