- 浏览: 3560850 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (1491)
- Hibernate (28)
- spring (37)
- struts2 (19)
- jsp (12)
- servlet (2)
- mysql (24)
- tomcat (3)
- weblogic (1)
- ajax (36)
- jquery (47)
- html (43)
- JS (32)
- ibatis (0)
- DWR (3)
- EXTJS (43)
- Linux (15)
- Maven (3)
- python (8)
- 其他 (8)
- JAVASE (6)
- java javase string (0)
- JAVA 语法 (3)
- juddiv3 (15)
- Mule (1)
- jquery easyui (2)
- mule esb (1)
- java (644)
- log4j (4)
- weka (12)
- android (257)
- web services (4)
- PHP (1)
- 算法 (18)
- 数据结构 算法 (7)
- 数据挖掘 (4)
- 期刊 (6)
- 面试 (5)
- C++ (1)
- 论文 (10)
- 工作 (1)
- 数据结构 (6)
- JAVA配置 (1)
- JAVA垃圾回收 (2)
- SVM (13)
- web st (1)
- jvm (7)
- weka libsvm (1)
- weka屈伟 (1)
- job (2)
- 排序 算法 面试 (3)
- spss (2)
- 搜索引擎 (6)
- java 爬虫 (6)
- 分布式 (1)
- data ming (1)
- eclipse (6)
- 正则表达式 (1)
- 分词器 (2)
- 张孝祥 (1)
- solr (3)
- nutch (1)
- 爬虫 (4)
- lucene (3)
- 狗日的腾讯 (1)
- 我的收藏网址 (13)
- 网络 (1)
- java 数据结构 (22)
- ACM (7)
- jboss (0)
- 大纸 (10)
- maven2 (0)
- elipse (0)
- SVN使用 (2)
- office (1)
- .net (14)
- extjs4 (2)
- zhaopin (0)
- C (2)
- spring mvc (5)
- JPA (9)
- iphone (3)
- css (3)
- 前端框架 (2)
- jui (1)
- dwz (1)
- joomla (1)
- im (1)
- web (2)
- 1 (0)
- 移动UI (1)
- java (1)
- jsoup (1)
- 管理模板 (2)
- javajava (1)
- kali (7)
- 单片机 (1)
- 嵌入式 (1)
- mybatis (2)
- layui (7)
- asp (12)
- asp.net (1)
- sql (1)
- c# (4)
- andorid (1)
- 地价 (1)
- yihuo (1)
- oracle (1)
最新评论
-
endual:
https://blog.csdn.net/chenxbxh2 ...
IE6 bug -
ice86rain:
你好,ES跑起来了吗?我的在tomcat启动时卡在这里Hibe ...
ES架构技术介绍 -
TopLongMan:
...
java public ,protect,friendly,private的方法权限(转) -
贝塔ZQ:
java实现操作word中的表格内容,用插件实现的话,可以试试 ...
java 读取 doc poi读取word中的表格(转) -
ysj570440569:
Maven多模块spring + springMVC + JP ...
Spring+SpringMVC+JPA
Step by Step Method to Access Webservice from Android
Article | Browse Code | Stats | Revisions (5) |
|
4.14 (6 votes ) |
System Requirements
The sections below describe the system and software requirements for developing Android applications using the Android SDK.
Supported Operating Systems
- Windows XP (32-bit) or Vista (32- or 64-bit)
- Mac OS X 10.5.8 or later (x86 only)
- Linux (tested on Linux Ubuntu Hardy Heron)
Supported Development Environments
Eclipse IDE
- Eclipse 3.4 (Ganymede) or 3.5 (Galileo)
Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.
- Eclipse JDT plugin (included in most Eclipse IDE packages)
- If you need to install or update Eclipse, you can download it from http://www.eclipse.org/downloads/
.
Several types of Eclipse packages are available for each platform. For developing Android applications, we recommend that you install one of these packages:
- Eclipse IDE for Java EE Developers
- Eclipse IDE for Java Developers
- Eclipse for RCP/Plug-in Developers
- Eclipse Classic (versions 3.5.1 and higher)
- JDK 5 or JDK 6 (JRE alone is not sufficient)
- Android Development Tools plugin (optional)
- Not compatible with Gnu Compiler for Java (gcj)
Hardware Requirements
The Android SDK requires disk storage for all of the components that you choose to install. The table below provides a rough idea of the disk-space requirements to expect, based on the components that you plan to use.
Component type |
Approximate size |
Comments |
SDK Tools |
50 MB |
Required. |
Android platform (each) |
150 MB |
At least one platform is required. |
SDK Add-on (each) |
100 MB |
Optional. |
USB Driver for Windows |
10 MB |
Optional. For Windows only. |
Samples (per platform) |
10M |
Optional. |
Offline documentation |
250 MB |
Optional. |
Note that the disk-space requirements above are in addition to those of the Eclipse IDE, JDK, or other prerequisite tools that you may need to install on your development computer.
Installing the ADT Plugin for Eclipse
- Start Eclipse, then select Help > Install New Software .
- In the Available Software dialog, click Add... .
- In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL:
https://dl-ssl.google.com/android /eclipse/
Note : If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).
Click OK .
- Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next .
- In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish .
- Restart Eclipse.
Configuring the ADT Plugin
Once you've successfully downloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:
- Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences ).
- Select Android from the left panel.
- For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
Click Apply , then OK .
Creating an Android Project
The ADT plugin provides a New Project Wizard that you can use to quickly create a new Android project (or a project from existing code). To create a new project:
- Select File > New > Project .
- Select Android > Android Project , and click Next .
- Select the contents for the project:
- Enter 'Android WSAccess '. This will be the name of the folder where your project is created.
- Under Contents, select Create new project in workspace . Select your project workspace location.
- Under Target, select an Android
target to be used as the project's Build Target. The Build Target specifies which Android
platform you'd like your application built against.
Unless you know that you'll be using new APIs introduced in the latest SDK, you should select a target with the lowest platform version possible.
Note: You can change your the Build Target for your project at any time: Right-click the project in the Package Explorer, select Properties , select Android and then check the desired Project Target.
- Under Properties, fill in all necessary fields.
- Enter an Application name as ' Android WSAccess' . This is the human-readable title for your application — the name that will appear on the Android device.
- Enter a Package name
as '
com.test.android
'. This is the package namespace (following the same rules as for packages in the Java programming language) where all your source code will reside. - Select Create Activity
(optional, of course, but common) and enter a name (give '
FirstAppUI
') for your mainActivity
class. - Enter a Min SDK Version
. This is an integer that indicates
the minimum API Level required to properly run your application.
Entering this here automatically sets the
minSdkVersion
attribute in the<uses-sdk>
of your Android Manifest file. If you're unsure of the appropriate API Level to use, copy the API Level listed for the Build Target you selected in the Target tab.
- Click Finish .
Tip: You can also start the New Project Wizard from the New icon in the toolbar.
Once you complete the New Project Wizard, ADT creates the following folders and files in your new project:
src/
<Android
Version>
/
(e.g., Android
2.2/
)Includes the android .jar file that your application will build against. This is determined by the build target that you have chosen in the New Project Wizard.
gen/
This contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.
assets/
res/
Android
Manifest.xml
default.properties
Creating an AVD
An Android Virtual Device (AVD) is a device configuration for the emulator that allows you to model real world devices. In order to run an instance of the emulator, you must create an AVD.
To create an AVD from Eclipse:
- Select Window > Android SDK and AVD Manager , or click the Android SDK and AVD Manager icon in the Eclipse toolbar.
- In the Virtual Devices panel, you'll see a list of existing AVDs. Click New to create a new AVD.
- Fill in the details for the AVD.
Give it a name, a platform target, an SD card size, and a skin (HVGA is default).
Note: Be sure to define a target for your AVD that satisfies your application's Build Target (the AVD platform target must have an API Level equal to or greater than the API Level that your application compiles against).
- Click Create AVD .
Your AVD is now ready and you can either close the SDK and AVD Manager, create more AVDs, or launch an emulator with the AVD by selecting a device and clicking Start .
Code your FirstAppUI.java class like below:
package com.test.android ; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android .app.Activity; import android .os.Bundle; import android .widget.ArrayAdapter; import android .widget.AutoCompleteTextView; public class FirstAppUI extends Activity { private static final String NAMESPACE = " com.service.ServiceImpl" ; private static final String URL = " http://192.168.202.124:9000/Android WS/wsdl/ServiceImpl.wsdl" ; private static final String SOAP_ACTION = " ServiceImpl" ; private static final String METHOD_NAME = " message" ; private static final String[] sampleACTV = new String[] { " android " , " iphone" , " blackberry" }; @Override public void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); setContentView(R.layout.main); ArrayAdapter<String> arrAdapter = new ArrayAdapter<String> (this , android .R.layout.simple_dropdown_item_1line, sampleACTV); AutoCompleteTextView ACTV = (AutoCompleteTextView)findViewById (R.id.AutoCompleteTextView01); ACTV.setAdapter(arrAdapter); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); HttpTransportSE android HttpTransport = new HttpTransportSE(URL); try { android HttpTransport.call(SOAP_ACTION, envelope); SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn; ACTV.setHint(" Received :" + resultsRequestSOAP.toString()); } catch (Exception e) { e.printStackTrace(); } } }
Insert AutoCompleteTextView
to your res>layout >main.xml
as:
<? xml version =" 1.0" encoding =" utf-8" ? > < LinearLayout android :id =" @+id/LinearLayout01" android :layout_width =" fill_parent" android :layout_height =" fill_parent" xmlns:android =" http://schemas.android .com/apk/res/android " > < AutoCompleteTextView android :id =" @+id/AutoCompleteTextView01" android :layout_width =" wrap_content" android :layout_height =" wrap_content" android :hint =" This is Hint" android :width =" 240px" / > < / LinearLayout >
Insert Internet access permission to your mobile application in Android Manifest.xml file as:
<? xml version =" 1.0" encoding =" utf-8" ? > < manifest xmlns:android =" http://schemas.android .com/apk/res/android " package =" com.test.android " android :versionCode =" 1" android :versionName =" 1.0" > < application android :icon =" @drawable/icon" android :label =" @string/app_name" > < activity android :name =" .FirstAppUI" android :label =" @string/app_name" > < intent-filter > < action android :name =" android .intent.action.MAIN" / > < category android :name =" android .intent.category.LAUNCHER" / > < / intent-filter > < / activity > < / application > < uses-permission android :name =" android .permission.INTERNET" > < / uses-permission > < uses-sdk android :minSdkVersion =" 8" / > < / manifest >
ServiceImpl.wsdl :
<? xml version =" 1.0" encoding =" UTF-8" ? > < wsdl:definitions targetNamespace =http://service.com xmlns:apachesoap =http://xml.apache.org/xml-soap xmlns:impl =" http://service.com" xmlns:intf =http://service.com xmlns:wsdl =http://schemas.xmlsoap.org/wsdl/ xmlns:wsdlsoap =http://schemas.xmlsoap.org/wsdl/soap/ xmlns:xsd =" http://www.w3.org/2001/XMLSchema" > <!-- WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT) --> < wsdl:types > < schema elementFormDefault =" qualified" targetNamespace =" http://service.com" xmlns =" http://www.w3.org/2001/XMLSchema" > < element name =" message" > < complexType / > < / element > < element name =" messageResponse" > < complexType > < sequence > < element name =" messageReturn" type =" xsd:string" / > < / sequence > < / complexType > < / element > < / schema > < / wsdl:types > < wsdl:message name =" messageResponse" > < wsdl:part element =" impl:messageResponse" name =" parameters" > < / wsdl:part > < / wsdl:message > < wsdl:message name =" messageRequest" > < wsdl:part element =" impl:message" name =" parameters" > < / wsdl:part > < / wsdl:message > < wsdl:portType name =" ServiceImpl" > < wsdl:operation name =" message" > < wsdl:input message =" impl:messageRequest" name =" messageRequest" > < / wsdl:input > < wsdl:output message =" impl:messageResponse" name =" messageResponse" > < / wsdl:output > < / wsdl:operation > < / wsdl:portType > < wsdl:binding name =" ServiceImplSoapBinding" type =" impl:ServiceImpl" > < wsdlsoap:binding style =" document" transport =" http://schemas.xmlsoap.org/soap/http" / > < wsdl:operation name =" message" > < wsdlsoap:operation soapAction =" " / > < wsdl:input name =" messageRequest" > < wsdlsoap:body use =" literal" / > < / wsdl:input > < wsdl:output name =" messageResponse" > < wsdlsoap:body use =" literal" / > < / wsdl:output > < / wsdl:operation > < / wsdl:binding > < wsdl:service name =" ServiceImplService" > < wsdl:port binding =" impl:ServiceImplSoapBinding" name =" ServiceImpl" > < wsdlsoap:address location = " http://localhost:9000/Android WS/services /ServiceImpl" / > < / wsdl:port > < / wsdl:service > < / wsdl:definitions >
Thanks!
History
- 24th September, 2010: Initial post
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
About the Author
Mihira Prasanna
Software Developer
Synapsys Ltd, DFCC Bank, Sri Lanka Sri Lanka Member |
Researching innovation of software technology. |
|
Comments and Discussions
You must Sign In to use this message board. (secure sign-in ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
Everything else Copyright © CodeProject , 1999-2011
Terms of Use
发表评论
-
android离线
2019-11-04 21:25 293https://www.jianshu.com/p/fdfc4 ... -
android 异步更新
2015-07-11 22:42 1496http://www.apkbus.com/forum.php ... -
仿微米
2015-06-26 10:22 0http://www.javaapk.com/source/4 ... -
仿微信
2015-06-26 10:21 1914http://www.javaapk.com/source/1 ... -
网易客户端
2015-06-26 10:20 1598http://www.javaapk.com/source/4 ... -
仿朋友圈
2015-06-26 10:18 1697http://www.javaapk.com/source/8 ... -
仿朋友圈
2015-06-26 10:13 1831http://www.eoeandroid.com/threa ... -
全国ABC查询
2015-06-26 10:07 1361IM 功能 环信云 信息统计 Umeng 分享Umeng 更新 ... -
android 判断网络
2015-06-25 16:00 1261http://www.cnblogs.com/renqingp ... -
android 多彩表格
2015-05-31 16:06 1469http://blog.csdn.net/conowen/ar ... -
android socket
2015-05-31 16:01 1640http://blog.csdn.net/conowen/ar ... -
微信播放语音3
2015-02-25 12:00 1427http://download.csdn.net/detail ... -
微信语音播放2
2015-02-25 11:57 1349http://download.csdn.net/detail ... -
微信语音播放
2015-02-25 11:56 1697http://www.apkbus.com/android-1 ... -
超强的资料整合
2015-01-05 11:04 1219http://zz563143188.iteye.com/bl ... -
最强开发资源平台大合集
2015-01-04 14:50 1882程序员代码应用开发平 ... -
Android-Universal-Image-Loader 图片异步加载类库的使用(超详细配置)
2014-09-04 15:45 1371http://blog.csdn.net/vipzjyno1/ ... -
android应用推广
2014-09-03 23:25 1309应用推广不必愁,有米 ... -
android 图片异步加载
2014-09-03 16:47 1127http://www.csdn.net/article/201 ... -
android hander的使用
2014-09-02 23:46 1357http://www.cnblogs.com/xiaoran1 ...
相关推荐
在本项目"手把手教你做Android手机遥控车.zip"中,我们将探讨如何利用Android设备作为遥控器来控制一辆玩具车。这个项目集成了移动技术、蓝牙通信和硬件接口设计,让我们一起深入了解一下其中的关键知识点。 1. **...
手把手教你学DSP:基于TMS320F28335 手把手教你学DSP:基于TMS320F28335 手把手教你学DSP:基于TMS320F28335 手把手教你学DSP:基于TMS320F28335 手把手教你学DSP:基于TMS320F28335 手把手教你学DSP:基于TMS320F...
在上述教程中,使用的最小SDK版本为7,这意味着应用至少支持Android 2.1(API level 7)及以上版本。然而,随着Android系统的不断更新和升级,开发者应该注意新版本Android带来的新特性和API变化,适时地更新和适配...
手把手教你用Android开发新浪微博客户端.学习android的好材料,帮了我不少忙,现在拿出来同大家分享
在《手把手教你用Android开发新浪微博客户端》这本书中,作者会逐步引导读者完成以上所有步骤,包括设置项目、获取API权限、设计UI、实现网络请求以及处理数据。书中的实例代码和详细解释将帮助初学者快速掌握...
《手把手教你学DSP2812》是一本专为初学者设计的 DSP(Digital Signal Processor)学习指南,主要围绕TI公司的TMS320F2812 DSP芯片进行讲解。这本书以其全面且易懂的特性,为读者提供了一个深入理解数字信号处理及其...
手把手教你学28335PDF文档,看了这个确实和2812有了对比
资源名称:手把手教你学Android 4.1教学视频资源目录:【】Activity间数据传递【】Activity(上)【】Android4.0设计规范pdf【】Android基础界面控件(上)【】Android基础界面控件(下)【】Android程序分析【】...
【标题】"手把手教你学DSPPDF"是一份针对数字信号处理(DSP)初学者的教程性PDF文档,旨在引领读者逐步掌握这一领域的基础知识。该文档可能包含了从理论概念到实际应用的全面讲解,适合那些希望踏入数字信号处理世界...
### 手把手教你Android编译 #### 一、Android编译概述 Android作为一个开源的操作系统,支持多种架构的编译,包括32位和64位。本文将详细介绍如何在32位和64位环境下进行Android源码的编译。 #### 二、32位系统...
手把手教你学DSP28335高清pdf文件,北京航空航天大学出版社
手把手教你学DSP28335,PDF格式,有助于随时随地可以学习知识。
《手把手教你用C#制作RPG游戏》是由罗培羽编著,海洋出版社于2014年5月出版的一本技术书籍,主要面向对游戏开发有兴趣,特别是想使用C#语言进行角色扮演游戏(RPG)开发的读者。本书通过详细的教学指导,帮助初学者...
Android的绿机器人形象深入人心,其开发应用吸引着各类厂商与程序员的眼球,学习了4年的Android,当然也积累了不少的资料,现在整理出来提供给大家,Android众多的实战源码、学习视频与开发技巧,希望能为大家了解、...
手把手教你学dsp F2812 顾伟刚
《手把手教你学51单片机》是一本专为初学者设计的嵌入式开发入门教程,旨在帮助读者从零开始掌握51单片机的基础知识和应用技能。51单片机是嵌入式系统中最基础且广泛应用的一类微控制器,广泛应用于智能家居、工业...
手把手教你使用Git
《手把手教你用C#制作RPG游戏》是罗培羽撰写的一本深入浅出的IT书籍,专门针对想要学习如何使用C#编程语言开发角色扮演游戏(RPG)的读者。这本书详细介绍了从零开始构建RPG游戏的全过程,涵盖了C#的基础知识以及...
本文将手把手教你如何从零开始构建这样一个客户端。作者以初学者的角度出发,记录了开发过程,旨在帮助同样初涉Android开发的读者。 在开发之前,你需要确保拥有一个Android开发环境,包括Eclipse Helios(3.6.1)...