标签:configuration avd sdk java android
我试图在我的64位Ubuntu 12.04发行版上启动并运行Android模拟器.首先,我必须安装ia32-lib才能解决以前(失败)尝试中遇到的一些较早的问题.
然后,我下载并安装了64位linux发行版.我在命令行上导航到android应用程序(SDK管理器),然后运行它.我下载了Android工具和最新版本的Android OS.
我现在想运行模拟器,但是当我这样做时,出现以下错误:
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运行仿真器,但是在第二个窗口中的输出似乎需要4-8个命令行参数?
>在什么时候启动AVD Manager并设置机器?
提前致谢!
解决方法:
您必须在启动模拟器之前创建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
标签:configuration,avd,sdk,java,android 来源: https://codeday.me/bug/20191031/1972394.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。