Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve this : 'Running android lint' issue

Tags:

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.

like image 615
AndroidLearner Avatar asked Sep 03 '12 07:09

AndroidLearner


People also ask

How do you stop lint errors?

@SuppressLint("NewApi") Just invoke the quickfix for the warning, and one of the options will be to ignore the issue with an annotation; this will annotate either the local declaration, or the method, or the class, or the field, depending on the location of the error.

What is lint error Android?

The lint tool checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization. When using Android Studio, configured lint and IDE inspections run whenever you build your app.

How do you do lint check on Android?

Lint checks are automatically performed by the Gradle build system. To see the available checks in Android Studio File Settings Editor Inspections. You can also run the lint checks manually by right-clicking on your project and select Analyze Inspect Code. You can run link also from the command line.

How do you check for lint error?

1.In the Android view, open your project and select the project, a folder, or a file that you want to analyze. 2. From the menu bar, select Analyze > Inspect Code. 3.In the Specify Inspection Scope dialog, review the settings.


1 Answers

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 :).

like image 95
Bill Avatar answered Oct 24 '22 02:10

Bill