xe10中android模拟器
2014-01-06 10:13:48 BruceBaoZhiqiang 阅读数 462
在模拟器中安装软件,实现下载两个安装文件,比如saolei.apk 先把文件复制粘贴到platform-tools
Android在模拟器中安装软件 - 小鲍 - 小鲍
 
Cmd进入dos
Android在模拟器中安装软件 - 小鲍 - 小鲍

安装成功

2013-06-15 22:31:37 derek_yi 阅读数 683
1、指定路径

在.bashrc中新增环境变量,如下

    ANDROID_PRODUCT_OUT=~/ics/ics-4.0.4/out/target/product/generic
    ANDROID_PRODUCT_OUT_BIN=~/ics/ics-4.0.4/out/host/linux-x86/bin
    export PATH=${PATH}:${ANDROID_PRODUCT_OUT_BIN}:${ANDROID_PRODUCT_OUT};
然后在命令行输入,使之生效。
    source ~/.bashrc


2、创建avd

---------------------------------------------------------------------

失败提示:

derek@u10:~$ cd ~/ics
derek@u10:~/ics$ android create avd -n aaa -t 1

Error: Target id is not valid. Use 'android list targets' to get the target ids.

解决方法:

derek@u10:~/ics$ android list targets
Available Android targets:


To get around this problem type android in your terminal. Then click Available sources > check the box and click install selected. It will then go off and download all of the SDK packages via an https repository server at google.com/android.

Now re-run android create avd --target 2 --name my_avd and it should allow you to create the AVD and map it to a target.
---------------------------------------------------------------------

失败提示:

derek@u10:~/ics$ android

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
解决办法:
download swt.jar of 64-bit, replace the 32bit one

---------------------------------------------------------------------

创建avd

derek@u10:~/ics/ics-4.0.4$ android create avd -n aaa -f -p ~/avd/aaa -t 1
Auto-selecting single ABI armeabi-v7a
Android 4.0.3 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD 'test2' based on Android 4.0.3, ARM (armeabi-v7a) processor,
with the following hardware config:
hw.lcd.density=240
vm.heapSize=48
hw.ramSize=512

cd out/target/product/generic  
emulator -system system.img -ramdisk ramdisk.img @aaa
//userdata.img在创建avd时已复制到 avd/aaa,内核使用默认目录,即./out/host/linux-x86/system-images/android-15/armeabi-v7a/kernel-qemu

---------------------------------------------------------------------
3、也可以不创建avd运行虚拟机,对应两种界面:(如不自宫,也能成功,哈哈)
emulator -kernel ./out/host/linux-x86/system-images/android-15/armeabi-v7a/kernel-qemu -sysdir ./out/target/product/generic -system system.img -data userdata.img -ramdisk ./out/target/product/generic/ramdisk.img -memory 200 -skindir ./out/host/linux-x86/platforms/android-15/skins -skin WSVGA
//pad

emulator -kernel ./out/host/linux-x86/system-images/android-15/armeabi-v7a/kernel-qemu -sysdir ./out/target/product/generic -system system.img -data userdata.img -ramdisk ./out/target/product/generic/ramdisk.img -memory 200 -skindir ./out/host/linux-x86/platforms/android-15/skins -skin HVGA
//phone
---------------------------------------------------------------------
2016-01-04 13:46:40 kaku21 阅读数 331

我本人使用的Genymotion模拟器,安装及配置另起文章叙述

Genymotion的设置中找到ADB标签页,选择Use custom Android SDK tools,指定sdk路径

设置后,如果需要在启动的模拟器中安装apk,首先,将apk文件拷贝至sdk/platform-tools目录下

然后,打开cmd命令行,进入该目录,执行命令 adb install *.apk 命令

执行后,可以在模拟器中看到apk已经安装

没有更多推荐了,返回首页