genymotion+android+sdk,Genymotion – An Android emulator you can use

7c16255fa9c61772c5b8a9cbde564659.png

The following guest blog post is from Titan Trevor Ward. Thanks for the contribution, Trevor.

I was fortunate to attend the Titanium App Camp in Atlanta. This event was awesome and, although I was there to help out, I managed to spend sometime on Saturday evening to undertake Tech Debt. With so many of the senior Titans and quite a few Appcelerator personnel, including Jeff Haynie, in attendance, I decided to have a full look at the new Android emulator Genymotion.

With a few guidance points from Stephen Feather, Genymotion was up and running within a very short time. Then the issues started (none of which remain unresolved).

Firstly, let’s see what Genymotion does. Go to https://www.genymotion.com/ and sign up. Yes, you have to sign up but at the current time it’s free.

4a7d247121b1d06cbed6abc680e885a5.png

If you have already signed up then you have to go into the sign up screen to login. After logging in, go to the user guide and installation section. You will need to install the Oracle VirtualBox as well as Genymotion follow the instructions and your away.

Run Genymotion

344f7f2789d92f0d06650a70dddf54ed.png

Go ahead and add a device. Just click “add” and follow the instructions. When you run it you will see what Genymotion can offer. It is very fast. Ok, that’s an understatement.

ba27b7514030dffd1fb23a6a8f40a931.png

The first thing you will notice is that this is a full blown Android emulator. It acts just like a device, with one exception – it’s faster than most Android devices.

Until Titanium 3.2 comes out (Yes it’s being supported by Appcelerator), there is no direct link from studio to run the emulator and install your application directly. So here is a little script you can use.

#!/bin/sh

rm -r build/android

ti build -p android -b

echo 'Installing Project to Device'

adb install -r build/android/bin/app.apk

exit

Place the script in the main application directory, start a Genymotion emulator and run the script. (OK it’s a script for Mac, but I’m sure you can create one for windows if needed).

Here are a few gotcha’s

Running Titanium Studio with cloud services enabled works for both Alloy and Classic applications, however the same cannot be said for the Appcelerator Platform. The cloud test framework causes issues with the emulator and ends up with some awesomely weird results.

To get round this, uninstall the “com-soasta-touchtest“ module from the application. Be aware that just removing it from the TiApp.xml GUI will not fully uninstall it, you need to go into the xml and comment it out.

Your application should now be running. If not, it may depend on what other modules you have running. Quite a few modules need to be compiled to run with the X86 emulator.

Go to ~/Library/Application Support/Titanium/modules/android/”module”/”version”/libs and see if there is an X86 directory. If so, you are good to go. If not you may need to get it compiled incorporating the x86 emulation.

If the application doesn’t install on the emulator, make sure that you have only 1 emulator running and no other Android devices connected.

Now what can you use it for

Well firstly Genymotion will give you a very productive and efficient Android emulator to use during development. Additionally, it will also give you an emulator that can be used to run your applications after development. This is excellent for customer service teams, demonstrations and a multitude of other uses.

You can also install any applications from the google store, test flight and any other of the methods used to install applications.

A final note: if you run the Android Monitor while running the emulator, you will get a complete runtime diagnostic. This is an ideal way to spot any reasons why application modules are failing to run. Enjoy!

4c9361676116f4f20f5b890d49b7eb4b.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值