Search code examples
androideclipseandroid-lint

Lint for android in Eclipse gives wrong results


If I run "lint ." inside project directory I get the expected warnings, but if I run it from inside eclipse I get nonsense errors and warnings, for example:

  • The resource R.array.settings_derivatives appears to be unused [in fact, it is used]
  • The x.y.z is not registered in the manifest [in fact, it is registered]
  • Call requires API level 3 (current min is 1): android.view.SurfaceView#isInEditMode [in fact minSdkVersion is set to 7]

edit: If I create a new workspace and import the existing projects I get the right errors


Solution

  • There seems to be an issue, when the project directory is not directly under the workspace directory.

    As of today the bug should be fixed in release 20: http://code.google.com/p/android/issues/detail?id=27527

    Edit:

    If necessary you can make a softlink into the workspace.