android入门(1)安装及hello world

android入门(1)安装及hello world

1. 下载安装jdk+eclipse+adt+android_sdk, 参考http://developer.android.com/sdk/index.html
2。编写helloworld,参考http://developer.android.com/resources/tutorials/hello-world.html
注意一点,如果编译时出错,

Android Emulator is not starting showing “ invalid command-line parameter”
http://stackoverflow.com/questions/6638713/android-emulator-is-not-starting-showing-invalid-command-line-parameter
http://stackoverflow.com/questions/6629273/android-emulator-invalid-command-line-parameter

----Q1-----

-download android sdk
- run AVD Manager
    Install a Platform
    Create an AVD
    Create a New Android Project
- 安装adt(http://developer.android.com/sdk/eclipse-adt.html#installing)
    Help > Install New Software....
    https://dl-ssl.google.com/android/eclipse/
Configuring the ADT Plugin
    Window > 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.

----Q2-----
[2012-03-04 12:58:12 - Emulator] PANIC: Could not open: C:\Documents and

Settings\Administrator\.android/avd/avd231.ini

http://code.google.com/p/android/issues/detail?id=19084
As a work-around, you can define the environment variable ANDROID_SDK_HOME to

point to the directory containing your .android directory. The emulator and SDK

Manager will pick it up properly.

Will look into this. There is likely a difference between the way the SDK Manager and

emulator pick up the user's directory when this variable is not defined.


set ANDROID_SDK_HOME=e:
start G:\soft\eclipse-java-indigo-win32\eclipse\eclipse.exe

----Q3-----
The adb tool has moved to platform-tools/

If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK

Platform-tools"

Please also update your PATH environment variable to
include the

platform-tools/ directory, so you can
execute adb from any location.



adb uninstall com.example.android.apis

Note:Before run the command,pls run the avd first

posted on 2011-09-22 02:14  cutepig  阅读(1444)  评论(0编辑  收藏  举报

导航