In my app, I am using Pull TO Refresh list view library. I had designed layouts for all screens respectively. When I ran lint on my project, in one of my layout file for xlarge screen, it gave me fatal error:
Class referenced in the layout file, com.handmark.pulltorefresh.library.PullToRefreshListView, was not found in the project or the libraries
While in same layout file for other screens, it is giving no error at all. Also, I had used same library in other layouts of my file, where it does not give any error. It is giving same error for Google Maps
api as well. My project targets Google Api level 16 and I had checked, all libraries are added to it. But,the error doesn't go away even on cleaning project.
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.
Configuring lint checking in Java and XML source files Tip: If you are using Android Studio, you can use the File > Settings > Project Settings > Inspections feature to manage the lint checking to your Java or XML source files.
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.
The lint xml file is therefore configured in the gradle through the use of lintOptions. Linting can be disabled in java files by adding the @SuppressLint annotation to that code. For example, how you can turn off lint checking for the NewApi issue in the onCreate method.
This is a lint bug and you can safely ignore it. Lint is meant to help, not to hinder your development time. Change the lint Errors to warnings and you can compile and run the app just fine. I don't recommend turning it off because it helps to keep your code cleaner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With