eclipse – How to solve this : 'Running android lint' issue-ThrowExceptions

Exception or error:

In any activity of my project, if i do some changes and then save that activity i got the message “Running android lint has encountered a problem.”

This is the my error log :

java.lang.NullPointerException
at com.android.ide.eclipse.adt.AdtUtils.workspacePathToFile(AdtUtils.java:466)
at com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.getClassPath(EclipseLintClient.java:753)
at com.android.tools.lint.client.api.LintClient.getJavaClassFolders(LintClient.java:198)
at com.android.tools.lint.detector.api.Project.getJavaClassFolders(Project.java:270)
at com.android.tools.lint.client.api.LintDriver.checkIndividualClassFiles(LintDriver.java:977)
at com.android.tools.lint.client.api.LintDriver.checkClasses(LintDriver.java:920)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:785)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:661)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:288)
at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:151)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)\

I don’t to know how to solve this.

How to solve:

However, the root cause here is some sort of invalid project definition — one or more of the class path entries are pointing to a resource which can’t be opened; for example, you might have a classpath reference which is relative to a class path variable, and the class path variable is no longer pointing to an absolute location.

The above CL will simply make sure that lint doesn’t throw an exception in this scenario, but it won’t be able to do actually include the given reference.

You’ll want to look at the project properties dialog and make sure all the build paths and resources are correct — and that’s the workaround until this issue is integrated

###

The following steps helped me to solve the same issue.

  1. On My Project -> Context Menu -> Android Tools -> Fix Project Properties
  2. Changing to latest version in AndroidManifest.xml

    android:targetSdkVersion="21"
    

Maybe just one of them is enough :).

###

In Window > Preferences > Android > Lint Error Checking; Uncheck “When saving files check for errors”.

I hope it will helps you

###

What worked for me was to open the “appcompat_v7” project on my Package explorer. I had closed it before and forgot to open so I got the same problem as OP. Now it’s all fixed

###

Here is another solution, just tested it.

Go to Project properties -> Java and set compiler change Compiler compliance level: to 1.7.

If this is not working then try Project properties -> Android switch from what ever it is using to android 4.4.2.

###

In my particular case, the problem was caused by conflicting key bindings.

Check .metadata/.log in your project folder for hints.

###

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.

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”

You may find this post helpful : http://code2care.org/pages/solution-running-android-lint-has-encountered-a-problem-nullpointerexception-error/

Leave a Reply

Your email address will not be published. Required fields are marked *