Search code examples
androidandroid-lint

Strange Lint-errors in Android project


since I updated my Android SDK today I get some strange Lint errors in my project. The activity contains amongst others a textview. Everything works fine, but if I want to change the text size of the view within the code with .setTextSize(float size), I get in other lines (and also other independent methods) errors that a call requires a certain API level. But that are calls like string.isEmpty(), which is available since API level 1. What am I missing? And I know, I can set the text size also in the xml-file, but I want to change it during runtime.

Any ideas? Thanks!

Best regards Tobi


Solution

  • I think I got into something similar some time ago (nonsense Lint errors)... Are you working with Eclipse? If so, you can try the following:

    1. Restart Eclipse
    2. Clean your project (Project->clean...)
    3. Click the button "Runs Android Lint..." (it's in the toolbar, between the "Virtual device manager" and the "new project wizard")

    I don't remember exactly what did I do to solve the problem, I hope it works though Good luck!