내보내기(0) 인쇄
모두 확장

How to: Use the Sample Android Application in the Windows Azure Toolkit for Android

Author: Ralph Squillace

Reviewer: Scott Densmore

This topic describes how to download, build, and run the sample storage client application in the Windows Azure Toolkit for Android. This topic requires:

The project loads and compiles in Eclipse Indigo IDE for Java Developers (installable here) and runs using the Android Emulator; it does not describe how to install the sample application on an Android device. (For more information on installing applications during development, see Using Hardware Devices.) Lastly, this topic describes how to use Eclipse to clone and then load and use any contained projects from a git repository at http://www.github.com, but does not describe git or GitHub themselves.

Important중요
This topic assumes that you have already downloaded and are running the Eclipse IDE for Java Indigo Service Release 2; a new topic using a more current version will appear shortly. (Because of the differences between versions, please note which version you are going to use and adjust the instructions accordingly if documentation for your version isn’t yet available.) For more troubleshooting tips getting your Eclipse and Java environment running properly, see Getting Started.

Eclipse 버전이 사용됩니다.

Eclipse 플러그인 버전이 사용됩니다.

Building and Running the Android Storage Application in Eclipse

  1. To get the sample application with the toolkit, navigate to https://github.com/WindowsAzure-Toolkits/wa-toolkit-android to read the GitHub project page. You then have two choices: You can download the .zip file, uncompress it, and then use the files within from Eclipse as a local repository; or you can use Eclipse to perform this step from within the IDE.

  2. To download the .zip file and unzip it, click https://github.com/WindowsAzure-Toolkits/wa-toolkit-android/zipball/master, uncompress the folder structure, and place the files in a location that is easily accessible location. It might look like this:

    zipball을 포함하는 디렉터리입니다.
  3. Open Eclipse. The default window looks something like the following.

    Eclipse의 첫 번째 뷰입니다.
  4. Importing Toolkit Source and Projects

    1. From the File menu, choose Import…, and when the Import Selection dialog appears, choose Projects from Git, as shown below.

      git 프로젝트를 가져옵니다.
    2. Choose local (if you zipped or cloned on your own) or provide URI.

      git 리포지토리 위치를 선택합니다.
    3. Provide the Git repository URI and set the git:// protocol scheme: git://github.com/WindowsAzure-Toolkits/wa-toolkit-android.git. (You can also use the https:// scheme, or provide a file path.)

      git 프로토콜을 선택합니다.
    4. Select the master branch (or another branch if you want to build newer versions in the testing phase).

      git 프로젝트 분기를 가져옵니다.
    5. The repository is cloned to the repository path you specified in step c, above.

      복제한 리포지토리를 가져옵니다.
    6. Confirm that you want to import the existing projects.

      가져올 기존 프로젝트를 선택합니다.
    7. Select which projects to import into the Eclipse workspace. Here you must select at least Access Control for Android, Windows Azure Storage for Android, and the Windows Azure Storage for Android Sample Application.

      작업 영역의 프로젝트를 선택합니다.
    8. The Eclipse workspace should open and appear something like the following graphic.

      프로젝트의 첫 번째 열기입니다.
  5. Now you modify the targets to build the projects correctly. For each project in your workspace, right-click the project in the Package Explorer and choose Properties. In the Properties form (an example is shown below), select Android in the left pane, and select the Android Project Build Target you have installed and want to build toward.

    프로젝트 대상을 업데이트합니다.
  6. Right-click the Windows Azure Storage for Android Sample Application, choose Run As..., and select Android Application. If you build and run, you should see the emulator appear. When it does, the default screen may need to be “opened”. Click the lock and drag it to the unlocked position, as the following graphic shows.

    note참고
    How long the compilation and emulator start-up period is depends upon your platform and its resources. You may also see several console processes appear and disappear as the emulator starts.

    에뮬레이터의 잠금을 해제합니다.
  7. Once the emulator is unlocked, you should see the following screen, indicating that you must provide valid toolkit connection type parameters in your application.

    구성 오류 응용 프로그램 화면입니다.
  8. Update the toolkit_connection_type information in the project to use the Direct connection type and to have the DirectAccessKey and AccountName of the Windows Azure storage account. (To find your account information to run the application, see How to View, Copy, and Regenerate Access Keys for a Windows Azure Storage Account.)

    1. In the Eclipse Package Explorer, expand the Windows Azure Storage for Android Sample Application project, then expand the res entry, the values entry, and double-click the strings.xml file.

    2. In the strings.xml view in the middle panel, scroll down until you see the toolkit_connection_type value, and enter Direct as the value, as in the following image:

      Toolkit의 유형을 선택합니다.
    3. Enter the DirectAccessKey and AccountName values from your Windows Azure storage account. The following graphic shows the entry of the account name to the direct_account_value.

      계정 이름을 설정합니다.
  9. Press Run, and the emulator should launch, providing you with the following experience.

    응용 프로그램을 실행합니다.

참고 항목


빌드 날짜:

2013-01-07

커뮤니티 추가 항목

표시:
© 2014 Microsoft