3

64 ビットの Ubuntu 12.04 ディストリビューションで Android エミュレーターを起動して実行しようとしています。最初に、ia32-libs をインストールして、以前の (失敗した) 試行で発生した以前の問題を回避する必要がありました。

次に、64 ビットの Linux ディストリビューションをダウンロードしてインストールしました。androidコマンド ラインでアプリケーション (SDK Manager)に移動し、実行しました。Android Tools と Android OS の最新フレーバーをダウンロードしました。

を実行したいemulatorのですが、実行すると次のエラーが発生します。

myUser@myMachine:~/android-sdk/21.1/android-sdk-linux/tools$ ./emulator

emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.

If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (see -help-avd for details).

Otherwise, follow the instructions in -help-disk-images to start the emulator

実行する./emulator -help-disk-imagesと、次のような出力が得られます。

kernel-qemu      the emulator-specific Linux kernel image
ramdisk.img      the ramdisk image used to boot the system
system.img       the *initial* system image
userdata.img     the *initial* data partition image

It will also use the following writable image files:

userdata-qemu.img  the persistent data partition image
system-qemu.img    an *optional* persistent system image
cache.img          an *optional* cache partition image
sdcard.img         an *optional* SD Card partition image

snapshots.img      an *optional* state snapshots image

If you're neither using the SDK or the Android build system, you
can still run the emulator by explicitely providing the paths to
*all* required disk images through a combination of the following
options: -sysdir, -datadir, -kernel, -ramdisk, -system, -data, -cache
-sdcard and -snapstorage.

これは非常に紛らわしいです。エミュレーターを使用している YouTube の例を見たことがあります./emulator -datadir=/some/path

だから私は尋ねます:

  • SDK、「 Androidビルドシステム」(???)を介してエミュレーターを実行することと、ここで試みているような端末を介してエミュレーターを実行することの違いは何ですか?
  • エミュレータを 経由で実行できる場合がある./emulator -datadir=/some/pathのに、この 2 番目のウィンドウの出力には 4 ~ 8 個のコマンド ライン引数が必要なように見えるのはなぜですか?
  • AVD Manager を起動してマシンをセットアップするのはどの時点ですか?

前もって感謝します!

4

1 に答える 1

4

エミュレーターを起動する前に、AVD 構成を作成する必要があります。

android create avd -n <name> -t <targetID> [-<option> <value>] ... 

http://developer.android.com/tools/devices/managing-avds-cmdline.html#AVDCmdLine

その後、起動する準備が整いました

emulator -avd <avd_name> [<options>]

http://developer.android.com/tools/devices/emulator.html#starting

于 2013-04-13T21:40:41.100 に答える