検索

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)

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 fromhttp://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 arein 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

  1. Start Eclipse, then select Help > Install New Software.
  2. In the Available Software dialog, clickAdd....
  3. 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.

  1. 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.
  2. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. ClickNext to read and accept the license agreement and install any dependencies, then clickFinish.
  3. 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:

  1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse >Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, clickBrowse... 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:

  1. Select File > New > Project.
  2. Select Android > Android Project, and click Next.
  3. Select the contents for the project:
    • Enter 'AndroidWSAccess'. 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, selectProperties, select Android and then check the desired Project Target.

    • Under Properties, fill in all necessary fields.
      • Enter an Application name as 'AndroidWSAccess'. 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 theminSdkVersion attribute in the <uses-sdk></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.
  4. Click Finish.

Tip: You can also start the New Project Wizard from theNew icon in the toolbar.

Once you complete the New Project Wizard, ADT creates the following folders and files in your new project:

src/
Includes your stub Activity Java file. All other Java files for your application go here.
<em><android version></android></em>/ (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 yourR.java file and interfaces created from AIDL files.

assets/
This is empty. You can use it to store raw asset files.
res/
A folder for your application resources, such as drawable files, layout files, string values, etc.
AndroidManifest.xml
The Android Manifest for your project.
default.properties
This file contains project settings, such as the build target. This file is integral to the project, as such, it should be maintained in a Source Revision Control system. It should never be edited manually — to edit project properties, right-click the project folder and select "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:

  1. Select Window > Android SDK and AVD Manager, or click the Android SDK and AVD Manager icon in the Eclipse toolbar.
  2. In the Virtual Devices panel, you'll see a list of existing AVDs. ClickNew to create a new AVD.
  3. 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).

  4. 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 clickingStart.

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/AndroidWS/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 androidHttpTransport = new HttpTransportSE(URL);

		try {
			androidHttpTransport.call(SOAP_ACTION, envelope);
			SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
			ACTV.setHint("Received :" + resultsRequestSOAP.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

</string></string>
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"></autocompletetextview>  

 </linearlayout>
Insert Internet access permission to your mobile application inAndroidManifest.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"></action>
                <category android:name="android.intent.category.LAUNCHER"></category>
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <uses-sdk android:minsdkversion="8"></uses-sdk>

</manifest> 
ServiceImpl.wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<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)-->
 <types>
  <schema elementformdefault="qualified" targetnamespace="http://service.com" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="message">
    <complextype></complextype>
   </element>
   <element name="messageResponse">
    <complextype>
     <sequence>
      <element name="messageReturn" type="xsd:string"></element>
     </sequence>
    </complextype>
   </element>
  </schema>
 </types>

   <message name="messageResponse">
      <part element="impl:messageResponse" name="parameters">
      </part>
   </message>
   <message name="messageRequest">
      <part element="impl:message" name="parameters">
      </part>
   </message>
   <porttype name="ServiceImpl">
      <operation name="message">
         <input message="impl:messageRequest" name="messageRequest">
         <output message="impl:messageResponse" name="messageResponse">
       </output>
      </operation>
   </porttype>
   <binding name="ServiceImplSoapBinding" type="impl:ServiceImpl">
      <binding><br>
<p>This is from : http://www.codeproject.com/Articles/112381/Step-by-Step-Method-to-Access-Webservice-from-Andr</p>
<p>推荐:http://www.c-sharpcorner.com/UploadFile/88b6e5/how-to-call-web-service-in-android-using-soap/<br>
</p>

<p><span><br>
</span></p>


</binding></binding></definitions>
声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
access如何设置验证规则access如何设置验证规则Apr 10, 2024 am 10:59 AM

Access 验证规则是一种数据验证工具,用于确保数据符合特定条件,防止输入无效数据。设置验证规则的步骤:1. 选择要设置验证规则的字段;2. 打开“字段属性”对话框并切换到“查找”选项卡;3. 在“验证规则”字段中输入验证规则;4. 在“验证文本”字段中输入不符合规则时的错误消息;5. 单击“确定”保存更改。

microsoft access是什么软件microsoft access是什么软件Mar 03, 2023 am 11:37 AM

microsoft access是由微软发布的关系数据库管理系统;它结合了MicrosoftJet Database Engine和图形用户界面两项特点,是Microsoft Office的系统程序之一。

access数据库的扩展名是什么access数据库的扩展名是什么Apr 10, 2024 am 11:10 AM

Access 数据库文件的扩展名为 .accdb,自 Microsoft Access 2007 起开始使用,用于识别包含结构化数据的容器文件,如表、查询和窗体。

access和trunk端口的区别是什么access和trunk端口的区别是什么Oct 31, 2023 pm 05:59 PM

access和trunk端口的区别:1、Access端口用于连接终端设备,提供单个VLAN的接入,而Trunk端口用于连接交换机之间,提供多个VLAN的传输;2、Access端口只传输属于指定VLAN的数据,而Trunk端口可以传输多个VLAN的数据,并使用VLAN标签进行区分。

access数据库有什么功能access数据库有什么功能Apr 10, 2024 pm 12:29 PM

Microsoft Access 是一款用于创建、管理和查询数据库的关系型数据库管理系统,提供以下功能:数据存储和管理数据查询和检索表单和报表创建数据分析和可视化关系数据库管理自动化和宏多用户支持数据库安全可移植性

access中如何导入excel数据access中如何导入excel数据Apr 10, 2024 pm 01:44 PM

将 Excel 数据导入 Access 的步骤:1. 打开 Access 数据库。2. 创建链接的表,选择 Excel 工作簿。3. 选择 Excel 表格。4. 映射字段。5. 选择数据选项。6. 导入数据。7. 管理链接的数据。

access是什么软件access是什么软件Apr 10, 2024 am 10:55 AM

Microsoft Access 是一款关系型数据库管理系统 (RDBMS),用于存储、管理和分析数据。它主要用于数据管理、导入/导出、查询/报表生成、用户界面设计和应用程序开发。Access 优势包括易用性、集成数据库管理、强大灵活、与 Office 集成和可扩展性。

vb中怎么连接access数据库vb中怎么连接access数据库Oct 09, 2023 am 11:38 AM

vb中连接access数据库的步骤包括引用必要的命名空间、创建连接字符串、创建连接对象、打开连接、执行SQL语句和关闭连接。详细介绍:1、引用必要的命名空间,在VB项目中,首先需要引用“System.Data`和`Microsoft.Office.Interop.Access”命名空间,以便使用ADO.NET和Access相关的类和方法,可以在VB项目的引用中添加这些命名等等。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強力な PHP 統合開発環境

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

EditPlus 中国語クラック版

EditPlus 中国語クラック版

サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません