You may wonder why we use PMD rulesets. Remember that to have one code base targeting Android 1.5, 1.6, and 2.x you have to use a minSDK of 3 and targetSDK of 4 in the manifest? So how od you get your IDE to warn you when using certain 1.6 calls when you should be using 1.5 calls?
<rule name="DoNotCodebuildStringDetectOneSix" message="Do not code detect build string as 1.6 but as 1.5" class="net.sourceforge.pmd.rules.XPathRule">
<description>do not use getApplicationInfo().targetSdkVersion use int sdkVersion = Integer.parseInt(Build.VERSION.SDK); instead</description>
<priority>3</priority>
<properties>
<property name="xpath">
<value>//Literal[starts-with(@Image,’getApplicationInfo().targetSdkVersion ‘)]</value>
</property>
</properties>
</rule>
That little rule prevents you form using the android 1.6 style of detecting a build string and forces you to use the 1.5 style of detecting a build string