How do I get more memory on the Android emulator? I've already installed the KitchenSink, and with both that app and my own app - there is nearly zero memory left to run stuff.
I can see in the log that random pids start being dropped due to no memory and then my own app while I'm testing it dies.
What's the process to increase the SD card or whatnot up to 256mgs or higher?
You need to find your android tools directory, and run the "android" executable. You would have possibly already used this to download the Android SDK (on which Titanium Developer is dependent), and in future you will use it to update to new Android releases.
On my system, the directory is /opt/android-sdk-linux_86/tools, but if you are on a linux system, you may be able to simply type "which android" and its location will be returned.
Once running, you will see a "Virtual Devices" category on the left which, when clicked, will list the virtual machines that have (typically) automatically been configured by Titanium (the ones with titanium_*) names. Note the name of the one you've been using, delete them all, and recreate an AVD with the parameters (including the SD size) that you need. Then restart TiDev, and launch your app.
Read more about: AVD
Alternatively you could hack the script that TiDev uses to create the AVDs. Go to the directory where you usually update your Titanium mobile sdk (the latest builds are available here and change to the SDK your apps are currently using. Then find the android/builder.py script, where you can amend the following line:
info("Creating shared 64M SD card for use in Android emulator(s)") run.run([self.sdk.get_mksdcard(), '64M', self.sdcard])
Then delete all your AVDs using the AVD tool, restart TiDev and boot your app using the SDK you have amended.
Obviously with this method you will need to edit the script each time you update the Ti SDK.
Hope this is useful
I tried both solutions, I set the SD card to 500M (see below), but I still get "no space left on device" despite my app is below 200mb
[DEBUG] SDK: /Developer/android-sdk-mac_x86 [INFO] Creating 500M SD card for use in Android emulator [DEBUG] /Developer/android-sdk-mac_x86/tools/mksdcard 500M /Users/myname/.titanium/android2.sdcard
Any suggestion ?