Monday, May 31, 2010

Exception: Error executing child request for ChartImg.axd

I got this exception when I used the charts built-in to .NET 3.5. The scenario in which I got this exception was only when the charts first appeared after postback.

Solution: In the web.config file add 'POST' to the DataVisualization verbs:
The old syntax:
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false" />

The new syntax:
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false" />

Tuesday, May 11, 2010

Android SDK Error: Unable to resolve target 'android-X'

There are few variants of this error message:
Unable to resolve target 'android-1'
Unable to resolve target 'android-2'
Unable to resolve target 'android-3'
Unable to resolve target 'android-4'
Unable to resolve target 'android-5'
Unable to resolve target 'android-6'
Unable to resolve target 'android-7'
Unable to resolve target 'android-8'
Unable to resolve target 'android-9'
Unable to resolve target 'android-10'
Unable to resolve target 'android-11'
Unable to resolve target 'android-12'
Unable to resolve target 'android-13'
Unable to resolve target 'android-14'
Unable to resolve target 'android-15'
Unable to resolve target 'android-16'
Unable to resolve target 'android-17'
Unable to resolve target 'android-18'
Unable to resolve target 'android-19'
Unable to resolve target 'android-20'
Unable to resolve target 'android-21'

Reason: Could not find the proper Android SDK version. If the android SDK is installed correctly the problem is that the platform SDK requested by the "default.properties" is not installed. For example:
Unable to resolve target 'android-1' - (Android 1.0) change the "default.properties"
Unable to resolve target 'android-2' - (Android 1.1) change the "default.properties"
Unable to resolve target 'android-3' - install SDK Platform Android 1.5
Unable to resolve target 'android-4' - install SDK Platform Android 1.6
Unable to resolve target 'android-5' - install SDK Platform Android 2.0
Unable to resolve target 'android-6' - install SDK Platform Android 2.0.1
Unable to resolve target 'android-7' - install SDK Platform Android 2.1
Unable to resolve target 'android-8' - install SDK Platform Android 2.2
Unable to resolve target 'android-9' - install SDK Platform Android 2.3
Unable to resolve target 'android-10' - install SDK Platform Android 2.3.3
Unable to resolve target 'android-11' - install SDK Platform Android 3.0
Unable to resolve target 'android-12' - install SDK Platform Android 3.1
Unable to resolve target 'android-13' - install SDK Platform Android 3.2
Unable to resolve target 'android-14' - install SDK Platform Android 4.0
Unable to resolve target 'android-15' - install SDK Platform Android 4.0.3
Unable to resolve target 'android-16' - install SDK Platform Android 4.1
Unable to resolve target 'android-17' - install SDK Platform Android 4.2
Unable to resolve target 'android-18' - install SDK Platform Android 4.3
Unable to resolve target 'android-19' - install SDK Platform Android 4.4
Unable to resolve target 'android-20' - (Android 4.4w) change the "default.properties"
Unable to resolve target 'android-21' - install SDK Platform Android 5.0.1

You can do this using the Android SDK Setup utility:
Option 1: Eclipse -
"Windows" \ "Android SDK and AVD Manager" \ "Available packages"

Option 2: Command line - start the "SDK Setup" here (x86):
C:\Program Files\Google\Android SDK\SDK Setup.exe
or here (x64)
C:\Program Files (x86)\Google\Android SDK\SDK Setup.exe