Infinum Android Talks #04 - Android Lint
-
Upload
denisinfinum -
Category
Technology
-
view
188 -
download
0
description
Transcript of Infinum Android Talks #04 - Android Lint
Android lintNikola Kapraljević nixa
Static code analysis tool that checks your Android project source files.
lint• introduced in ADT 16 (and Tools 16)!
• scans Android project sources for potential bugs!
• available as!
• command line tool!
• integrated with Android Studio
Code scanning workflow
$ gradle lint
errors
no errors
android studio doesn’t use lint.xml
command line demo
Android Studio
Android Studio integration
configuring checks
Suppress problems
available checks• $ lint —show!
• lists all available checks!
• http://tools.android.com/tips/lint-checks
my favorites• StringFormatMatches - Ensures that the format used in <string>
definitions is compatible with the String.format call!
• MissingTranslation - Checks for incomplete translations where not all strings are translated!
• ExtraTranslation - Checks for translations that appear to be unused!
• SpUsage - Looks for uses of dp instead of sp dimensions for text sizes!
• UnusedResources - Looks for unused resources!
• HardcodedText - Looks for hardcoded text attributes which should be converted to resource lookup
links• http://tools.android.com/tips/lint!
• http://developer.android.com/tools/help/lint.html
Thank you.