等很久的Android Emulatord开机画面

课本没有http://developer.android.com/guide/tutorials/hello-world.html所说的Create an AVD这个步骤,所以也会令人困扰!

To create an AVD, use the “android” tool provided in the Android SDK. Open a command prompt or terminal, navigate to the tools/ directory in the SDK package and execute:

android create avd –target 2 –name my_avd

照着做就对了!

有些操作跟课本的不一样,我把图片给贴出来,让大家看看:

2009-06-16_153254

这是参考http://developer.android.com/guide/developing/eclipse-adt.html的

  1. Select the contents for the project:
    • Enter a Project Name. 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, such as Android 1.1.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. This is the human-readable title for your application — the name that will appear on the Android device.
      • Enter a Package name. 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 for your main Activity 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.

那个Min SDK Version你填2,就是使用1.1的版本,填写就用到1.5的版本,如果乱填,会有错误讯息!

2009-06-16_171817
这是执行程式后第一个跑出的画面,不过我搞不懂这是什么画面?一直以为程式写错了,后来看到http://karolinman.spaces.live.com/blog/cns!E812C8EDCAC3C663!2323.entry这里有一句话:“等久一点会出现绿色小机器人的开机画面…要有耐心. 台湾就要改变了.”

原来要等很久喔,后来果真没错,就会进到下一个画面:

2009-06-16_172015

再继续等!

2009-06-16_172127

随便按了!

2009-06-16_172218

看到画面了,程式的结果呢?因为随便按掉了,所以就没了!不过确定是成功了!

有关于模拟器的操作一定要读这一节:http://developer.android.com/guide/developing/tools/emulator.html

不然有写程式也不一定看得到结果是否正确!