So I've successfully created an APK but I can't get the emulator to run it. I see the option in MMF, and when I click it it will start an emulator, but how do you get it to load your game?
Thanks!
Printable View
So I've successfully created an APK but I can't get the emulator to run it. I see the option in MMF, and when I click it it will start an emulator, but how do you get it to load your game?
Thanks!
Wait for the emulator to display the Android Home screen and then click Build & Run in MMF2.
I have got the emulator displaying the Android home screen and clicked build and run in MMF2, but it just sits there doing nothing...the green bar has filled up down the bottom of the MMF2 screen. I can successfully build the app as an apk using just the build option, but build and run seems to get stuck.
Maybe it's just because the emulator is very slow (VERY). You should use a real device.
I just manually installed it via command prompt and it worked fine after about 2 minutes through the emulator. I've left MMF2 at the build and run stage for over 20 minutes now...just saying the build and run might need to use administrator privileges some how, since I needed to run command prompt as administrator to get the manual install to work.
Rhysd,
If you wish to use an emulator, you also have another choice of Bluestacks. The way Bluestacks works is you build the .apk and click it as if it was an .exe. When you click it, the .apk will be installed into Bluestacks. You can then open Bluestacks, which emulates a 2.3.3 Android phone and/or tablet, and you can run the app inside it. The process from building the .apk to emulation is much faster, at least for me, than using the Android SDK Emulator.
Can you build an APK and then copy it to your phone?
(I like to do it via dropbox -- build direct to it ... open on phone and install)
At least this way you can see your creation on the phone now.
Sometimes build and run just doesn't want to work on certain phones and it is something between the Android SDK and the phone.
That is if you can build an APK just not use the build and run feature.
Yeah, copying to phone works fine :) It seems sub-apps are now crashing the app however :(
If you're having trouble getting the app to run on your phone, open CMD (Windows+R -> cmd) and navigate to your android directory with
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
then check to see what devices are connected with
adb devices
It will respond with "List of devices attached" and you should see your phone below. If not, then you either need to install your phone USB drivers or download a program called Wifi ADB (which may be rooted phones only). Once you've run that, it'll tell you the line you need to type into cmd which should be something like
adb connect 192.168.1.7
Run adb devices again and see if it worked. You can only build and run if there is only one device connected at a time.
I say the more type and shape of devices to test on, the better. Including the real and virtual ones.
Android x86 is a project which ports Android to run on PCs, and it's much, much faster then what the emulator provides, but remember that it's using a different architecture (MMF2 apps and Google's own apps work just fine.). You could put Android on a USB Drive or CD and run it (as a 'live session' in memory or install it) on another computer natively for testing your apps. (Jeff's idea of using Dropbox works great for this, and a plus if it's a touch screen PC.)
VirtualBox is free virtualizing software for running multiple operating systems simultaneously on the PC, and it works great with Android x86. I don't recommend solely relying on this for testing though.
Here's some info I had to struggle to find out:
•All applications must be signed. The system will not install an application on an emulator or a device if it is not signed.
http://developer.android.com/tools/p...p-signing.html
The link above explains more about how to do this.
Also, Bluestacks messed me up too. I was getting error messages, so I went into debug mode in Eclipse, and it gave me a rather abstract error message. I copied it into a search on:
http://stackoverflow.com/
A great resource, by the way. I found out that it was Bluestacks that was causing the problem. I uninstalled, relaunched everything and no more error message.