- 浏览: 2551379 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Android Talker(2)Project Environment
1. Some tips about the eclipse and old project
Error Message:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project ProjectName: The plugin com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1 requires Maven version [3.0.3,)
solution:
Change the version of maven from eclipse inside maven to outside maven 3.0.3.
Install the plugin android configurator for M2E with URL
Uninstall the old maven plugin and reinstall this Plugin
http://rgladwell.github.com/m2e-android/updates
http://rgladwell.github.com/m2e-android/
It is fixed.
Error Message:
case expressions must be constant expressions
solution:
Click on the red error icon, click on the tip 'migrate android code'
Put my click on switch, use command + 1, click 'convert switch to if else'
Error Message:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.4:jar (execution:default-jar, phase: process-class)
Solution:
The pom is not the latest one, I change it as follow, it works.
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<configuration> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory> <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<sdk>
<platform>8</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
Run the project rest client, sometimes, we need to restart the adb.
>adb \
kill-server
>adb \
start-server
Run the maven command to redeploy the latest packages to android emulator.
>mvn android:deploy
>mvn android:run
The rest server returns the JSON format data as follow:
[{"id":1,"personName":"UserName1"},{"id":2,"personName":"UserName2"}]
But I got error message as follow from getAll() List<Person> interface.
Error Message:
java.lang.ClassCastException: java.util.LinkedHashMap
Solution:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
// Perform the HTTP GET request
Person[] persons = restTemplate.getForObject(url, Person[].class);
// convert the array to a list and return it
return Arrays.asList(persons);
2. Debug that on Real Device
>adb devices
This command will list the devices.
>adb logcat
Show the real time log on the mobile device.
I am on MAC system, and I use maven to control the android project.
The name of the sample project is EasyRestClientAndroid
>clean install android:deploy android:run
How to enable the android phone
>settings ----> applications-----> check Unknown sources
>settings ----> Development ---> check USB debugging
check stay awake
check Allow mock locations
references:
http://stackoverflow.com/questions/11031709/android-maven-plugin-3-2-0-with-maven-3-0-4-not-compile-it
http://rgladwell.github.com/m2e-android/
http://stackoverflow.com/questions/6622287/issue-when-consume-rest-service-with-resttemplate-in-desktop-app
http://thompsonng.blogspot.com/2011/08/android-debug-with-hardware-device-in.html
http://developer.android.com/tools/device.html
http://www.mkyong.com/android/android-debugging-on-real-device/
1. Some tips about the eclipse and old project
Error Message:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project ProjectName: The plugin com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1 requires Maven version [3.0.3,)
solution:
Change the version of maven from eclipse inside maven to outside maven 3.0.3.
Install the plugin android configurator for M2E with URL
Uninstall the old maven plugin and reinstall this Plugin
http://rgladwell.github.com/m2e-android/updates
http://rgladwell.github.com/m2e-android/
It is fixed.
Error Message:
case expressions must be constant expressions
solution:
Click on the red error icon, click on the tip 'migrate android code'
Put my click on switch, use command + 1, click 'convert switch to if else'
Error Message:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.4:jar (execution:default-jar, phase: process-class)
Solution:
The pom is not the latest one, I change it as follow, it works.
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<configuration> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory> <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<sdk>
<platform>8</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
Run the project rest client, sometimes, we need to restart the adb.
>adb \
kill-server
>adb \
start-server
Run the maven command to redeploy the latest packages to android emulator.
>mvn android:deploy
>mvn android:run
The rest server returns the JSON format data as follow:
[{"id":1,"personName":"UserName1"},{"id":2,"personName":"UserName2"}]
But I got error message as follow from getAll() List<Person> interface.
Error Message:
java.lang.ClassCastException: java.util.LinkedHashMap
Solution:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
// Perform the HTTP GET request
Person[] persons = restTemplate.getForObject(url, Person[].class);
// convert the array to a list and return it
return Arrays.asList(persons);
2. Debug that on Real Device
>adb devices
This command will list the devices.
>adb logcat
Show the real time log on the mobile device.
I am on MAC system, and I use maven to control the android project.
The name of the sample project is EasyRestClientAndroid
>clean install android:deploy android:run
How to enable the android phone
>settings ----> applications-----> check Unknown sources
>settings ----> Development ---> check USB debugging
check stay awake
check Allow mock locations
references:
http://stackoverflow.com/questions/11031709/android-maven-plugin-3-2-0-with-maven-3-0-4-not-compile-it
http://rgladwell.github.com/m2e-android/
http://stackoverflow.com/questions/6622287/issue-when-consume-rest-service-with-resttemplate-in-desktop-app
http://thompsonng.blogspot.com/2011/08/android-debug-with-hardware-device-in.html
http://developer.android.com/tools/device.html
http://www.mkyong.com/android/android-debugging-on-real-device/
发表评论
-
ionic UI(4)ionic2 framework - basic and components and native
2016-03-24 02:33 1261ionic UI(4)ionic2 framework - b ... -
ionic UI(3)TypeScript - handbook
2016-03-22 23:21 634ionic UI(3)TypeScript - handboo ... -
ionic UI(2)ionic2 framework - TypeScript - tutorial
2016-03-22 06:52 1656ionic UI(2)ionic2 framework - T ... -
Parse and Heroku Service(3)Parse Server and Parse Dashboard
2016-03-22 06:30 967Parse and Heroku Service(3)Pars ... -
Parse and Heroku Service(2)Mail Templates and Push Notification
2016-03-22 02:45 583Parse and Heroku Service(2)Mail ... -
ionic UI(1)Introduction
2016-03-19 03:18 723ionic UI(1)Introduction 1 Inst ... -
Parse and Heroku Service(1)Heroku Installation and Play
2016-03-19 00:13 824Parse and Heroic Service(1)Hero ... -
Hybrid(5)Customize Meteor Directly Google Login
2015-09-01 02:33 911Hybrid(5)Customize Meteor Direc ... -
Hybrid(4)Favorite Places - Google Login
2015-09-01 02:02 1341Hybrid(4)Favorite Places - Goog ... -
Hybrid(3)More Meteor Example - Social
2015-08-11 05:04 757Hybrid(3)More Meteor Example - ... -
Hybrid(2)meteor Running Android and iOS
2015-07-28 23:59 1050Hybrid(2)meteor Running Android ... -
Create the Google Play Account
2015-07-18 06:42 1101Create the Google Play Account ... -
Secure REST API and Mobile(1)Document Read and Understand OAUTH2
2015-07-14 00:36 764Secure REST API and Mobile(1)Do ... -
Screen Size and Web Design
2015-07-11 01:11 726Screen Size and Web Design iPh ... -
Hybrid(1)ionic Cordova meteor
2015-06-25 05:49 471Hybrid(1)ionic Cordova meteor ... -
Android Fire Project(1)Recall Env and Knowledge
2015-02-11 12:28 687Android Fire Project(1)Recall ... -
Android Content Framework(1)Concept
2014-06-14 13:54 1081Android Content Framework(1)Con ... -
Feel Android Studio(1)Install and Update Android Studio
2014-04-11 03:12 2029Feel Android Studio(1)Install a ... -
IOS7 App Development Essentials(2)iBeacon
2014-03-05 05:55 890IOS7 App Development Essentials ... -
IOS7 App Development Essentials(1) Persistent Store
2014-03-05 05:54 1327IOS7 App Development Essentials ...
相关推荐
Talker2 网络客户端此 repo 与的客户端相关,这是一个 IRC-Socket.io 代理,允许您从任何 Web 连接使用 IRC。 它是一个包含 Web 客户端的静态存储库。 要运行它,只需设置一个 Web 服务器: python -m ...
ROS2 Android示例应用程序 这是使用ROS2使用Android / Java绑定的示例的集合基于rclandroid : ros2_android_listener ros2_android_talker 基于rcljava : ros2_listener_android ros2_talker_android 2016年10月3...
功能包learning_communation的cpp源码,包括talker.cpp和listener.cpp两个代码,注释详细,供参考
JE Talker 0.9 JE Talker 0.9 JE Talker 0.9 JE Talker 0.9
project-page.html已更新,可与Big Buddy Talker(BBT)Word1一起使用00库,Arduino是一家开源软硬件公司和制造商社区。Arduino始于21世纪初,深受电子制造商的欢迎,Arduino通过开源系统提供了很多灵活性。
2. **请求/响应模型**:描述了客户端如何发起请求,以及服务器如何返回响应。这包括请求的编码方式、请求参数、状态码和响应内容的格式。 3. **网络传输层**:可能涉及到TCP/IP协议,讨论如何确保数据的可靠传输,...
在这个"talker-listener通信实验"中,我们将深入理解Apollo Cyber的基本工作原理以及如何在本地环境中配置和运行示例。 首先,"Apollo Cyber"是一个高度模块化的框架,主要负责车辆传感器数据的采集、处理和分发。...
健谈者 - 健谈者适用于 Android 操作系统的手机和平板电脑应用程序,面向失语症或言语障碍人士,通过黑板上的不同视觉选项促进交流。发展这个项目是在 Eclipse IDE 中构建的,它将根据 Eclipse 项目具有文件夹层次...
"Mini Internet Talker"是一款基于Delphi 6开发的网络聊天应用,它包含了客户端和服务器端的完整实现,旨在提供一个实用的在线交流平台。这款软件的独特之处在于它采用了Mac风格的用户界面设计,使得其在视觉上具有...
自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本 系统依赖 配置 数据库创建 数据库初始化 如何运行测试套件 服务(作业队列,缓存服务器,搜索引擎等) ...
2. **ChatServer.java**:这是服务器的核心部分,它监听指定端口上的连接请求,并管理多个ChatHandler实例,每个实例对应一个连接的客户端。ChatServer可能包含启动、停止服务器的函数,以及管理和调度客户端连接的...
IEC 61162-1-2016 Single talker and multiple listeners最新英文版.pdf
Atlantis Talker是一款开源的基于telnet协议的聊天服务器,设计独特且功能丰富。它不仅提供了基本的文字聊天功能,还具备了留言板、邮件系统、游戏以及多房间等多元化交互体验,所有的这些功能都是通过纯ASCII字符来...
Talker-crx插件是一款专为谷歌浏览器Chrome设计的扩展程序,其主要功能是将网页上的文本内容转化为语音,让使用者能够以听的方式获取信息,极大地提升了阅读体验,特别是对于那些视力不佳、阅读困难或者在忙碌中需要...
rospy版本的通讯例程,talker发布与listener监听的源代码,里面还有roslaunch可以供参考,按照我博客里创建一个功能包,然后把这个代码放进去就可以运行了,是比较好的入门资料
8. 运行 talker 节点:`ros2 run learn talker` 9. 运行 listener 节点:`ros2 run learn listener` 二、Publisher 和 Subscriber 的创建 要创建一个 Publisher 和 Subscriber,需要按照以下步骤进行: 1. 首先,...
带有2个扬声器的密集模型(TODO) 带2个扬声器的PIT模型(TODO) 焦点层在构造中。 训练 适应层 预训练 python -m experiments.training.pretraining --men --women --loss sdr+l2 --separation mask --learning_...
2. **Java技术的应用** 使用Java作为开发语言,项目能够利用Java的跨平台特性,确保在各种操作系统上运行。此外,Java的面向对象特性有助于实现模块化设计,提高代码的可维护性和可扩展性。 3. **开源软件的优势**...