Showing posts from August, 2012

AVD Manager - Unable to find a 'userdata.img' file for ABI armeabi to copy into the AVD folder

When trying to create a new Android 4.0.3 virtual device I hit this problem for ages. When I clicked Create AVD it was just doing nothing:

On further investigation I noticed that eclipse was saying the following:
"Unable to find a 'userdata.img' file for ABI armeabi to copy into the AVD folder."
In order to fix this problem, in Eclipse choose Window -> Android SDK Manager
Once this loads, you need to ensure that you have installed ARM EABI v7a System Image under Android 4.0.3 (API15). 
Once this is installed, try to create the AVD again and it should just work. It would have been much better if the "Create AVD" button did something instead of just failing silently! Hope this helps you out.

ASP.NET upload image to database and retrieve into gallery

A recent request to a website I've been creating was to allow users to upload photos to the website, so that other users can see them. In order to do this I created this proof of concept which was easy to incorporate into my sites(s).  You can download the complete source here:
The first step is to create a database which will store the images and the description of the image. In Microsoft SQL Server I've created a new Database named "Example" and one table named "Photos". Within this table, create three columns:
Column Type UniqueID Unique Identifier Photo Image Description Text
Note: You'll need to add something like this to your Web.config file:
<appSettings>       <addkey="ConnectionString"value="Data Source=*your instance name*;Initial Catalog=Example;Integrated Security=True"/> </appSettings>

For the website, I've kept the default styles when you create a new ASP.NET Web Application, removing the two content pages …

Set JAVA_HOME in Windows 7

A common hassle whenever you get a new laptop or PC is setting up the java environment variables so that when you install Eclipse or Netbeans you are ready to go. For your, and my own future reference, this is how it is done (on Windows 7 at least).

1. Find out where you have installed the JDK, or install it from here:

e.g. C:\Program Files\Java\jdk1.7.0_04

2. Press the Windows button and type in "Environment Variables" and press enter.

This will open the following window:

3. Under System Variables, click "New..." and enter JAVA_HOME for the variable name, and the path to your jdk for your variable value:

4. Press OK.

5. Select the variable "Path" and choose to Edit this, and add the following at the end of the string:


6. Press OK, and then OK to the main dialog. You will now have your Java environment variables set up correctly.

That should be it - if I've missed anything out or you have any problems let me know!