你能使用Apportable当X code:上安装一个Android设备仿真器仿真器、你能、设备、code

2023-09-13 00:33:32 作者:指尖落樱舞

可以使用Apportable转换成iOS应用程序到Android,当您安装在X $ C $℃的Andr​​oid设备仿真器或我需要一个Android设备来编译和运行项目?我没有Android设备,并想测试此之前,我去购买一个。

Can you install an Android Device Simulator in Xcode when using Apportable to convert an iOS app to Android or do I need an Android device to compile and run the project? I dont have an android device and wanted to test this before I go buy one.

感谢

推荐答案

请注意,这是通常更容易与Android设备比模拟器的工作,但也可以使用仿真器:

Note that it is generally much easier to work with an Android device than the emulator, but it is possible to use the emulator:

〜/ .apportable / SDK /工具链/ MacOSX的/ Android的SDK /工具/ Android将推出的Andr​​oid工具,它可以创建AVD的。

~/.apportable/SDK/toolchain/macosx/android-sdk/tools/android will launch the android tool which can create AVD's.

请确保安装了ARM EABI V7A系统映像,然后创建一个AVD与API级别17,CPU的目标/ ARM(armeabi-V7A),约500 MIB SD卡大小的ABI,我通常选择一个WVGA800的内置皮肤,选择240抽象液晶密度的硬件特性,最大VM 48应用程序堆和至少512设备的RAM大小,内部存储至少应为500 MIB。最重要的是一定要检查使用主机GPU的框。

Make sure to install the ARM EABI v7a System Image, then create an AVD with a Target of API level 17, CPU/ABI of ARM (armeabi-v7a), the SD card size of around 500 MiB, I usually choose a builtin skin of WVGA800, select the Hardware features of Abstracted LCD density of 240, Max VM application heap of 48 and Device ram size of at least 512, internal storage should be at least 500 MiB. And most of all make sure to check the box for Use Host GPU.

运行仿真器:

DYLD_LIBRARY_PATH =〜/ .apportable / SDK /工具链/ MacOSX的/ Android的SDK / tools / lib目录/〜/ .apportable / SDK /工具链/ MacOSX的/ Android的SDK /工具/仿真器臂-avd模拟器-gpu上

DYLD_LIBRARY_PATH=~/.apportable/SDK/toolchain/macosx/android-sdk/tools/lib/ ~/.apportable/SDK/toolchain/macosx/android-sdk/tools/emulator-arm -avd emulator -gpu on

这将启动Android模拟器(注:这将需要一些启动),你可以使用模拟器来运行与应用程序和调试提供了调用apportable工具时指定根植= YES例如

This will launch the android emulator (note: this will take a bit to launch) and you can use the emulator to run apps with and debug provided that when invoking the apportable tool specify ROOTED=yes e.g.

根植=是MTP =无apportable调试

ROOTED=yes MTP=no apportable debug

下面是模拟器配置〜/ .android / AVD / emulator.avd / config.ini文件:

here is emulator configuration ~/.android/avd/emulator.avd/config.ini:

avd.ini.encoding=ISO-8859-1
hw.dPad=no
hw.lcd.density=320
sdcard.size=500M
hw.cpu.arch=arm
hw.device.hash=-708107041
hw.camera.back=none
disk.dataPartition.size=500M
hw.gpu.enabled=yes
skin.dynamic=yes
skin.path=720x1280
hw.keyboard=yes
hw.cpu.model=cortex-a8
hw.ramSize=1024
hw.device.manufacturer=Google
hw.sdCard=yes
hw.mainKeys=no
hw.accelerometer=yes
skin.name=720x1280
abi.type=armeabi-v7a
hw.trackBall=no
hw.device.name=Galaxy Nexus
hw.battery=yes
hw.sensors.proximity=yes
image.sysdir.1=system-images/android-17/armeabi-v7a/
hw.sensors.orientation=yes
hw.audioInput=yes
hw.camera.front=none
hw.gps=yes
vm.heapSize=200