Running Android Lint has encountered a problem NullPointerException Error


Today while working with Android Eclipse IDE i got the following error,

Problem Occurred

'Running Android Lint' has encountered a problem.

Failed java.lang.NullPointerException

Stacktrace :

java.lang.NullPointerException 
  at com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.getTargets(EclipseLintClient.java:924)
  at com.android.tools.lint.detector.api.Project.readManifest(Project.java:632)
  at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:936)
  at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:842)
  at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:423)
  at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:332)
  at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:164)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51)

WorkAround :

For Mac OS X Operating System :

Go to Menu : Eclipse -> Preferences -> Android -> Lint Error Checking and Un-Check : "When saving files, check for errors"

For Windows Operating System :

Go to Menu : Window -> Preferences -> Android -> Lint Error Checking and Un-Check : "When saving files, check for errors"

Why this Error?

It seems that its something related to appcompat_v7 library that we have in our package Explorer. If you are working with API (targetSdkVersion) level 21 you would not face this issue.

Solution :

It seems to be a existing issue with Android ADT Plugin, Google has released a fix (ADT Plugin for Eclipse 23.0.3)

Link : http://tools.android.com/recent/adtpluginforeclipse2303released

ADT 23.0.3 (August 8th 2014)

Dependencies:
Java 7 or higher is required if you are targeting the L Developer Preview.
Java 1.6 or higher is required if you are targeting other releases.
Eclipse Indigo (Version 3.7.2) or higher is required.
This version of ADT is designed for use with SDK Tools r23.0.2. If you haven't already installed SDK Tools r23.0.2 into your SDK, use the Android SDK Manager to do so.

General Notes:

Fixed an issue where ADT displayed a NullPointerException warning dialog when a valid SDK was not configured. (Issue 73313)
Fixed a minor issue with RenderScript support.
Disabled APK compression.

How to Apply the Fix 23.0.3

Go To : Help -> Check For Updates.

✏️ Note : Make sure you that you are using the https, not the http URL to the update center: https://dl.google.com/android/eclipse/

Now when you restart Eclipse IDE, you should not see any Lint Error pop-up's messages.

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap