1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>Lint Report</title>
7 <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
8 <link rel="stylesheet" href="https://www.gstatic.com/external_hosted/material_design_lite/mdl_css-blue-indigo-bundle.css" />
9 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
10 <script defer src="https://www.gstatic.com/external_hosted/material_design_lite/mdl_all_js_compiled.js"></script>
11 <style>
12 section.section--center {
13 max-width: 860px;
14 }
15 .mdl-card__supporting-text + .mdl-card__actions {
16 border-top: 1px solid rgba(0, 0, 0, 0.12);
17 }
18 main > .mdl-layout__tab-panel {
19 padding: 8px;
20 padding-top: 48px;
21 }
22
23 .mdl-card__actions {
24 margin: 0;
25 padding: 4px 40px;
26 color: inherit;
27 }
28 .mdl-card > * {
29 height: auto;
30 }
31 .mdl-card__actions a {
32 color: #00BCD4;
33 margin: 0;
34 }
35 .error-icon {
36 color: #bb7777;
37 vertical-align: bottom;
38 }
39 .warning-icon {
40 vertical-align: bottom;
41 }
42 .mdl-layout__content section:not(:last-of-type) {
43 position: relative;
44 margin-bottom: 48px;
45 }
46
47 .mdl-card .mdl-card__supporting-text {
48 margin: 40px;
49 -webkit-flex-grow: 1;
50 -ms-flex-positive: 1;
51 flex-grow: 1;
52 padding: 0;
53 color: inherit;
54 width: calc(100% - 80px);
55 }
56 div.mdl-layout__drawer-button .material-icons {
57 line-height: 48px;
58 }
59 .mdl-card .mdl-card__supporting-text {
60 margin-top: 0px;
61 }
62 .chips {
63 float: right;
64 vertical-align: middle;
65 }
66
67 pre.errorlines {
68 background-color: white;
69 font-family: monospace;
70 border: 1px solid #e0e0e0;
71 line-height: 0.9rem;
72 font-size: 0.9rem; padding: 1px 0px 1px; 1px;
73 overflow: scroll;
74 }
75 .prefix {
76 color: #660e7a;
77 font-weight: bold;
78 }
79 .attribute {
80 color: #0000ff;
81 font-weight: bold;
82 }
83 .value {
84 color: #008000;
85 font-weight: bold;
86 }
87 .tag {
88 color: #000080;
89 font-weight: bold;
90 }
91 .comment {
92 color: #808080;
93 font-style: italic;
94 }
95 .javadoc {
96 color: #808080;
97 font-style: italic;
98 }
99 .annotation {
100 color: #808000;
101 }
102 .string {
103 color: #008000;
104 font-weight: bold;
105 }
106 .number {
107 color: #0000ff;
108 }
109 .keyword {
110 color: #000080;
111 font-weight: bold;
112 }
113 .caretline {
114 background-color: #fffae3;
115 }
116 .lineno {
117 color: #999999;
118 background-color: #f0f0f0;
119 }
120 .error {
121 display: inline-block;
122 position:relative;
123 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AwCFR4T/3uLMgAAADxJREFUCNdNyLERQEAABMCjL4lQwIzcjErpguAL+C9AvgKJDbeD/PRpLdm35Hm+MU+cB+tCKaJW4L4YBy+CAiLJrFs9mgAAAABJRU5ErkJggg==) bottom repeat-x;
124 }
125 .warning {
126 text-decoration: none;
127 background-color: #f6ebbc;
128 }
129 .overview {
130 padding: 10pt;
131 width: 100%;
132 overflow: auto;
133 border-collapse:collapse;
134 }
135 .overview tr {
136 border-bottom: solid 1px #eeeeee;
137 }
138 .categoryColumn a {
139 text-decoration: none;
140 color: inherit;
141 }
142 .countColumn {
143 text-align: right;
144 padding-right: 20px;
145 width: 50px;
146 }
147 .issueColumn {
148 padding-left: 16px;
149 }
150 .categoryColumn {
151 position: relative;
152 left: -50px;
153 padding-top: 20px;
154 padding-bottom: 5px;
155 }
156 .options {
157 padding-left: 16px;
158 }
159 </style>
160 <script language="javascript" type="text/javascript">
161 <!--
162 function reveal(id) {
163 if (document.getElementById) {
164 document.getElementById(id).style.display = 'block';
165 document.getElementById(id+'Link').style.display = 'none';
166 }
167 }
168 function hideid(id) {
169 if (document.getElementById) {
170 document.getElementById(id).style.display = 'none';
171 }
172 }
173 //-->
174 </script>
175 </head>
176 <body class="mdl-color--grey-100 mdl-color-text--grey-700 mdl-base">
177 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
178 <header class="mdl-layout__header">
179 <div class="mdl-layout__header-row">
180 <span class="mdl-layout-title">Lint Report: 15 warnings</span>
181 <div class="mdl-layout-spacer"></div>
182 <nav class="mdl-navigation mdl-layout--large-screen-only">Check performed at Fri Aug 14 18:38:28 CDT 2026 by AGP (9.3.1)</nav>
183 </div>
184 </header>
185 <div class="mdl-layout__drawer">
186 <span class="mdl-layout-title">Issue Types</span>
187 <nav class="mdl-navigation">
188 <a class="mdl-navigation__link" href="#overview"><i class="material-icons">dashboard</i>Overview</a>
189 <a class="mdl-navigation__link" href="#OldTargetApi"><i class="material-icons warning-icon">warning</i>Target SDK attribute is not targeting latest version (1)</a>
190 <a class="mdl-navigation__link" href="#UnusedAttribute"><i class="material-icons warning-icon">warning</i>Attribute unused on older versions (1)</a>
191 <a class="mdl-navigation__link" href="#RedundantLabel"><i class="material-icons warning-icon">warning</i>Redundant label on activity (1)</a>
192 <a class="mdl-navigation__link" href="#AndroidGradlePluginVersion"><i class="material-icons warning-icon">warning</i>Obsolete Android Gradle Plugin Version (1)</a>
193 <a class="mdl-navigation__link" href="#GradleDependency"><i class="material-icons warning-icon">warning</i>Obsolete Gradle Dependency (3)</a>
194 <a class="mdl-navigation__link" href="#ExportedService"><i class="material-icons warning-icon">warning</i>Exported service does not require permission (1)</a>
195 <a class="mdl-navigation__link" href="#Overdraw"><i class="material-icons warning-icon">warning</i>Overdraw: Painting regions more than once (1)</a>
196 <a class="mdl-navigation__link" href="#UnusedResources"><i class="material-icons warning-icon">warning</i>Unused resources (3)</a>
197 <a class="mdl-navigation__link" href="#MonochromeLauncherIcon"><i class="material-icons warning-icon">warning</i>Monochrome icon is not defined (2)</a>
198 <a class="mdl-navigation__link" href="#ContentDescription"><i class="material-icons warning-icon">warning</i>Image without <code>contentDescription</code> (1)</a>
199 </nav>
200 </div>
201 <main class="mdl-layout__content">
202 <div class="mdl-layout__tab-panel is-active">
203 <a name="overview"></a>
204 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="OverviewCard" style="display: block;">
205 <div class="mdl-card mdl-cell mdl-cell--12-col">
206 <div class="mdl-card__title">
207 <h2 class="mdl-card__title-text">Overview</h2>
208 </div>
209 <div class="mdl-card__supporting-text">
210 <table class="overview">
211 <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Correctness">Correctness</a>
212 </td></tr>
213 <tr>
214 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
215 <a href="#OldTargetApi">OldTargetApi</a>: Target SDK attribute is not targeting latest version</td></tr>
216 <tr>
217 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
218 <a href="#UnusedAttribute">UnusedAttribute</a>: Attribute unused on older versions</td></tr>
219 <tr>
220 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
221 <a href="#RedundantLabel">RedundantLabel</a>: Redundant label on activity</td></tr>
222 <tr>
223 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
224 <a href="#AndroidGradlePluginVersion">AndroidGradlePluginVersion</a>: Obsolete Android Gradle Plugin Version</td></tr>
225 <tr>
226 <td class="countColumn">3</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
227 <a href="#GradleDependency">GradleDependency</a>: Obsolete Gradle Dependency</td></tr>
228 <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Security">Security</a>
229 </td></tr>
230 <tr>
231 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
232 <a href="#ExportedService">ExportedService</a>: Exported service does not require permission</td></tr>
233 <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Performance">Performance</a>
234 </td></tr>
235 <tr>
236 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
237 <a href="#Overdraw">Overdraw</a>: Overdraw: Painting regions more than once</td></tr>
238 <tr>
239 <td class="countColumn">3</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
240 <a href="#UnusedResources">UnusedResources</a>: Unused resources</td></tr>
241 <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Usability:Icons">Usability:Icons</a>
242 </td></tr>
243 <tr>
244 <td class="countColumn">2</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
245 <a href="#MonochromeLauncherIcon">MonochromeLauncherIcon</a>: Monochrome icon is not defined</td></tr>
246 <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Accessibility">Accessibility</a>
247 </td></tr>
248 <tr>
249 <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
250 <a href="#ContentDescription">ContentDescription</a>: Image without <code>contentDescription</code></td></tr>
251 <tr><td></td><td class="categoryColumn"><a href="#ExtraIssues">Included Additional Checks (20)</a>
252 </td></tr>
253 <tr><td></td><td class="categoryColumn"><a href="#MissingIssues">Disabled Checks (41)</a>
254 </td></tr>
255 </table>
256 <br/> </div>
257 <div class="mdl-card__actions mdl-card--border">
258 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="OverviewCardLink" onclick="hideid('OverviewCard');">
259 Dismiss</button> </div>
260 </div>
261 </section>
262 <a name="Correctness"></a>
263 <a name="OldTargetApi"></a>
264 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="OldTargetApiCard" style="display: block;">
265 <div class="mdl-card mdl-cell mdl-cell--12-col">
266 <div class="mdl-card__title">
267 <h2 class="mdl-card__title-text">Target SDK attribute is not targeting latest version</h2>
268 </div>
269 <div class="mdl-card__supporting-text">
270 <div class="issue">
271 <div class="warningslist">
272 <span class="location"><a href="../../build.gradle">../../build.gradle</a>:12</span>: <span class="message">Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the <code>android.os.Build.VERSION_CODES</code> javadoc for details.</span><br /><pre class="errorlines">
273 <span class="lineno"> 9 </span> defaultConfig {
274 <span class="lineno"> 10 </span> applicationId <span class="string">"com.jcrguru"</span>
275 <span class="lineno"> 11 </span> minSdk <span class="number">21</span>
276 <span class="caretline"><span class="lineno"> 12 </span> <span class="warning">targetSdk <span class="number">34</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
277 <span class="lineno"> 13 </span> versionCode <span class="number">1</span>
278 <span class="lineno"> 14 </span> versionName <span class="string">"1.0.0"</span>
279 <span class="lineno"> 15 </span> }
280 </pre>
281
282 </div>
283 <div class="metadata"><div class="explanation" id="explanationOldTargetApi" style="display: none;">
284 When your application or sdk runs on a version of Android that is more recent than your <code>targetSdk</code> specifies that it has been tested with, various compatibility modes kick in. This ensures that your application continues to work, but it may look out of place. For example, if the <code>targetSdk</code> is less than 14, your app may get an option button in the UI.<br/>
285 <br/>
286 To fix this issue, set the <code>targetSdk</code> to the highest available value. Then test your app to make sure everything works correctly. You may want to consult the compatibility notes to see what changes apply to each version you are adding support for: <a href="https://developer.android.com/reference/android/os/Build.VERSION_CODES.html">https://developer.android.com/reference/android/os/Build.VERSION_CODES.html</a> as well as follow this guide:<br/>
287 <a href="https://developer.android.com/distribute/best-practices/develop/target-sdk.html">https://developer.android.com/distribute/best-practices/develop/target-sdk.html</a><br/><div class="moreinfo">More info: <ul><li><a href="https://developer.android.com/distribute/best-practices/develop/target-sdk.html">https://developer.android.com/distribute/best-practices/develop/target-sdk.html</a>
288 <li><a href="https://developer.android.com/reference/android/os/Build.VERSION_CODES.html">https://developer.android.com/reference/android/os/Build.VERSION_CODES.html</a>
289 </ul></div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
290 To suppress this error, use the issue id "OldTargetApi" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
291 <br/></div>
292 </div>
293 </div>
294 <div class="chips">
295 <span class="mdl-chip">
296 <span class="mdl-chip__text">OldTargetApi</span>
297 </span>
298 <span class="mdl-chip">
299 <span class="mdl-chip__text">Correctness</span>
300 </span>
301 <span class="mdl-chip">
302 <span class="mdl-chip__text">Warning</span>
303 </span>
304 <span class="mdl-chip">
305 <span class="mdl-chip__text">Priority 6/10</span>
306 </span>
307 </div>
308 </div>
309 <div class="mdl-card__actions mdl-card--border">
310 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationOldTargetApiLink" onclick="reveal('explanationOldTargetApi');">
311 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="OldTargetApiCardLink" onclick="hideid('OldTargetApiCard');">
312 Dismiss</button> </div>
313 </div>
314 </section><a name="UnusedAttribute"></a>
315 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="UnusedAttributeCard" style="display: block;">
316 <div class="mdl-card mdl-cell mdl-cell--12-col">
317 <div class="mdl-card__title">
318 <h2 class="mdl-card__title-text">Attribute unused on older versions</h2>
319 </div>
320 <div class="mdl-card__supporting-text">
321 <div class="issue">
322 <div class="warningslist">
323 <span class="location"><a href="../../src/main/AndroidManifest.xml">../../src/main/AndroidManifest.xml</a>:46</span>: <span class="message">Attribute <code>autoVerify</code> is only used in API level 23 and higher (current min is 21)</span><br /><pre class="errorlines">
324 <span class="lineno"> 43 </span> <span class="prefix">android:</span><span class="attribute">value</span>=<span class="value">"${applicationId}.fileprovider"</span> />
325 <span class="lineno"> 44 </span>
326 <span class="lineno"> 45 </span> <span class="comment">&lt;!-- Handle deep links from the web app --></span>
327 <span class="caretline"><span class="lineno"> 46 </span> <span class="tag">&lt;intent-filter</span><span class="attribute"> </span><span class="warning"><span class="prefix">android:</span><span class="attribute">autoVerify</span>=<span class="value">"true"</span></span>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
328 <span class="lineno"> 47 </span> <span class="tag">&lt;action</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"android.intent.action.VIEW"</span> />
329 <span class="lineno"> 48 </span> <span class="tag">&lt;category</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"android.intent.category.DEFAULT"</span> />
330 <span class="lineno"> 49 </span> <span class="tag">&lt;category</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"android.intent.category.BROWSABLE"</span> />
331 </pre>
332
333 </div>
334 <div class="metadata"><div class="explanation" id="explanationUnusedAttribute" style="display: none;">
335 This check finds attributes set in XML files that were introduced in a version newer than the oldest version targeted by your application (with the <code>minSdkVersion</code> attribute).<br/>
336 <br/>
337 This is not an error; the application will simply ignore the attribute. However, if the attribute is important to the appearance or functionality of your application, you should consider finding an alternative way to achieve the same result with only available attributes, and then you can optionally create a copy of the layout in a layout-vNN folder which will be used on API NN or higher where you can take advantage of the newer attribute.<br/>
338 <br/>
339 Note: This check does not only apply to attributes. For example, some tags can be unused too, such as the new <code>&lt;tag></code> element in layouts introduced in API 21.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
340 To suppress this error, use the issue id "UnusedAttribute" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
341 <br/></div>
342 </div>
343 </div>
344 <div class="chips">
345 <span class="mdl-chip">
346 <span class="mdl-chip__text">UnusedAttribute</span>
347 </span>
348 <span class="mdl-chip">
349 <span class="mdl-chip__text">Correctness</span>
350 </span>
351 <span class="mdl-chip">
352 <span class="mdl-chip__text">Warning</span>
353 </span>
354 <span class="mdl-chip">
355 <span class="mdl-chip__text">Priority 6/10</span>
356 </span>
357 </div>
358 </div>
359 <div class="mdl-card__actions mdl-card--border">
360 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationUnusedAttributeLink" onclick="reveal('explanationUnusedAttribute');">
361 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="UnusedAttributeCardLink" onclick="hideid('UnusedAttributeCard');">
362 Dismiss</button> </div>
363 </div>
364 </section><a name="RedundantLabel"></a>
365 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="RedundantLabelCard" style="display: block;">
366 <div class="mdl-card mdl-cell mdl-cell--12-col">
367 <div class="mdl-card__title">
368 <h2 class="mdl-card__title-text">Redundant label on activity</h2>
369 </div>
370 <div class="mdl-card__supporting-text">
371 <div class="issue">
372 <div class="warningslist">
373 <span class="location"><a href="../../src/main/AndroidManifest.xml">../../src/main/AndroidManifest.xml</a>:19</span>: <span class="message">Redundant label can be removed</span><br /><pre class="errorlines">
374 <span class="lineno"> 16 </span> <span class="tag">&lt;activity</span><span class="attribute">
375 </span><span class="lineno"> 17 </span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">".MainActivity"</span>
376 <span class="lineno"> 18 </span> <span class="prefix">android:</span><span class="attribute">exported</span>=<span class="value">"true"</span>
377 <span class="caretline"><span class="lineno"> 19 </span> <span class="warning"><span class="prefix">android:</span><span class="attribute">label</span>=<span class="value">"@string/app_name"</span></span>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
378 <span class="lineno"> 20 </span> <span class="tag">&lt;intent-filter></span>
379 <span class="lineno"> 21 </span> <span class="tag">&lt;action</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"android.intent.action.MAIN"</span> />
380 <span class="lineno"> 22 </span> <span class="tag">&lt;category</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"android.intent.category.LAUNCHER"</span> />
381 </pre>
382
383 </div>
384 <div class="metadata"><div class="explanation" id="explanationRedundantLabel" style="display: none;">
385 When an activity does not have a label attribute, it will use the one from the application tag. Since the application has already specified the same label, the label on this activity can be omitted.<br/>To suppress this error, use the issue id "RedundantLabel" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
386 <br/></div>
387 </div>
388 </div>
389 <div class="chips">
390 <span class="mdl-chip">
391 <span class="mdl-chip__text">RedundantLabel</span>
392 </span>
393 <span class="mdl-chip">
394 <span class="mdl-chip__text">Correctness</span>
395 </span>
396 <span class="mdl-chip">
397 <span class="mdl-chip__text">Warning</span>
398 </span>
399 <span class="mdl-chip">
400 <span class="mdl-chip__text">Priority 5/10</span>
401 </span>
402 </div>
403 </div>
404 <div class="mdl-card__actions mdl-card--border">
405 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationRedundantLabelLink" onclick="reveal('explanationRedundantLabel');">
406 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="RedundantLabelCardLink" onclick="hideid('RedundantLabelCard');">
407 Dismiss</button> </div>
408 </div>
409 </section><a name="AndroidGradlePluginVersion"></a>
410 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="AndroidGradlePluginVersionCard" style="display: block;">
411 <div class="mdl-card mdl-cell mdl-cell--12-col">
412 <div class="mdl-card__title">
413 <h2 class="mdl-card__title-text">Obsolete Android Gradle Plugin Version</h2>
414 </div>
415 <div class="mdl-card__supporting-text">
416 <div class="issue">
417 <div class="warningslist">
418 <span class="location"><a href="../../../gradle/wrapper/gradle-wrapper.properties">../../../gradle/wrapper/gradle-wrapper.properties</a>:5</span>: <span class="message">A newer version of Gradle than 9.5.0 is available: 9.7.0</span><br /><pre class="errorlines">
419 <span class="lineno"> 2 </span>distributionPath=wrapper/dists
420 <span class="lineno"> 3 </span>zipStoreBase=GRADLE_USER_HOME
421 <span class="lineno"> 4 </span>zipStorePath=wrapper/dists
422 <span class="caretline"><span class="lineno"> 5 </span>distributionUrl=<span class="warning">https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
423 </pre>
424
425 </div>
426 <div class="metadata"><div class="explanation" id="explanationAndroidGradlePluginVersion" style="display: none;">
427 This detector looks for usage of the Android Gradle Plugin where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
428 To suppress this error, use the issue id "AndroidGradlePluginVersion" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
429 <br/></div>
430 </div>
431 </div>
432 <div class="chips">
433 <span class="mdl-chip">
434 <span class="mdl-chip__text">AndroidGradlePluginVersion</span>
435 </span>
436 <span class="mdl-chip">
437 <span class="mdl-chip__text">Correctness</span>
438 </span>
439 <span class="mdl-chip">
440 <span class="mdl-chip__text">Warning</span>
441 </span>
442 <span class="mdl-chip">
443 <span class="mdl-chip__text">Priority 4/10</span>
444 </span>
445 </div>
446 </div>
447 <div class="mdl-card__actions mdl-card--border">
448 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationAndroidGradlePluginVersionLink" onclick="reveal('explanationAndroidGradlePluginVersion');">
449 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="AndroidGradlePluginVersionCardLink" onclick="hideid('AndroidGradlePluginVersionCard');">
450 Dismiss</button> </div>
451 </div>
452 </section><a name="GradleDependency"></a>
453 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="GradleDependencyCard" style="display: block;">
454 <div class="mdl-card mdl-cell mdl-cell--12-col">
455 <div class="mdl-card__title">
456 <h2 class="mdl-card__title-text">Obsolete Gradle Dependency</h2>
457 </div>
458 <div class="mdl-card__supporting-text">
459 <div class="issue">
460 <div class="warningslist">
461 <span class="location"><a href="../../build.gradle">../../build.gradle</a>:6</span>: <span class="message">A newer version of <code>compileSdk</code> than 34 is available: 37</span><br /><pre class="errorlines">
462 <span class="lineno"> 3 </span>}
463 <span class="lineno"> 4 </span>
464 <span class="lineno"> 5 </span>android {
465 <span class="caretline"><span class="lineno"> 6 </span> <span class="warning">compileSdk <span class="number">34</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
466 <span class="lineno"> 7 </span> namespace <span class="string">"com.jcrguru"</span>
467 <span class="lineno"> 8 </span>
468 <span class="lineno"> 9 </span> defaultConfig {
469 </pre>
470
471 <span class="location"><a href="../../build.gradle">../../build.gradle</a>:51</span>: <span class="message">A newer version of androidx.appcompat:appcompat than 1.6.1 is available: 1.8.0</span><br /><pre class="errorlines">
472 <span class="lineno"> 48 </span>}
473 <span class="lineno"> 49 </span>
474 <span class="lineno"> 50 </span>dependencies {
475 <span class="caretline"><span class="lineno"> 51 </span> implementation <span class="warning"><span class="string">'androidx.appcompat:appcompat:1.6.1'</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
476 <span class="lineno"> 52 </span> implementation <span class="string">'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'</span>
477 <span class="lineno"> 53 </span>}
478 </pre>
479
480 <span class="location"><a href="../../build.gradle">../../build.gradle</a>:52</span>: <span class="message">A newer version of com.google.androidbrowserhelper:androidbrowserhelper than 2.5.0 is available: 2.7.3</span><br /><pre class="errorlines">
481 <span class="lineno"> 49 </span>
482 <span class="lineno"> 50 </span>dependencies {
483 <span class="lineno"> 51 </span> implementation <span class="string">'androidx.appcompat:appcompat:1.6.1'</span>
484 <span class="caretline"><span class="lineno"> 52 </span> implementation <span class="warning"><span class="string">'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
485 <span class="lineno"> 53 </span>}
486 </pre>
487
488 </div>
489 <div class="metadata"><div class="explanation" id="explanationGradleDependency" style="display: none;">
490 This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
491 To suppress this error, use the issue id "GradleDependency" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
492 <br/></div>
493 </div>
494 </div>
495 <div class="chips">
496 <span class="mdl-chip">
497 <span class="mdl-chip__text">GradleDependency</span>
498 </span>
499 <span class="mdl-chip">
500 <span class="mdl-chip__text">Correctness</span>
501 </span>
502 <span class="mdl-chip">
503 <span class="mdl-chip__text">Warning</span>
504 </span>
505 <span class="mdl-chip">
506 <span class="mdl-chip__text">Priority 4/10</span>
507 </span>
508 </div>
509 </div>
510 <div class="mdl-card__actions mdl-card--border">
511 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationGradleDependencyLink" onclick="reveal('explanationGradleDependency');">
512 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="GradleDependencyCardLink" onclick="hideid('GradleDependencyCard');">
513 Dismiss</button> </div>
514 </div>
515 </section>
516 <a name="Security"></a>
517 <a name="ExportedService"></a>
518 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="ExportedServiceCard" style="display: block;">
519 <div class="mdl-card mdl-cell mdl-cell--12-col">
520 <div class="mdl-card__title">
521 <h2 class="mdl-card__title-text">Exported service does not require permission</h2>
522 </div>
523 <div class="mdl-card__supporting-text">
524 <div class="issue">
525 <div class="warningslist">
526 <span class="location"><a href="../../src/main/AndroidManifest.xml">../../src/main/AndroidManifest.xml</a>:61</span>: <span class="message">Exported service does not require permission</span><br /><pre class="errorlines">
527 <span class="lineno"> 58 </span> <span class="prefix">android:</span><span class="attribute">exported</span>=<span class="value">"true"</span>
528 <span class="lineno"> 59 </span> <span class="prefix">android:</span><span class="attribute">theme</span>=<span class="value">"@style/AppTheme"</span> />
529 <span class="lineno"> 60 </span>
530 <span class="caretline"><span class="lineno"> 61 </span> <span class="tag">&lt;</span><span class="warning"><span class="tag">service</span></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="attribute">
531 </span><span class="lineno"> 62 </span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">name</span>=<span class="value">"com.google.androidbrowserhelper.trusted.DelegationService"</span>
532 <span class="lineno"> 63 </span> <span class="prefix">android:</span><span class="attribute">exported</span>=<span class="value">"true"</span>>
533 <span class="lineno"> 64 </span> <span class="tag">&lt;intent-filter></span></pre>
534
535 </div>
536 <div class="metadata"><div class="explanation" id="explanationExportedService" style="display: none;">
537 Exported services (services which either set <code>exported=true</code> or contain an intent-filter and do not specify <code>exported=false</code>) should define a permission that an entity must have in order to launch the service or bind to it. Without this, any application can use this service.<br/><div class="moreinfo">More info: <a href="https://goo.gle/ExportedService">https://goo.gle/ExportedService</a>
538 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
539 To suppress this error, use the issue id "ExportedService" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
540 <br/></div>
541 </div>
542 </div>
543 <div class="chips">
544 <span class="mdl-chip">
545 <span class="mdl-chip__text">ExportedService</span>
546 </span>
547 <span class="mdl-chip">
548 <span class="mdl-chip__text">Security</span>
549 </span>
550 <span class="mdl-chip">
551 <span class="mdl-chip__text">Warning</span>
552 </span>
553 <span class="mdl-chip">
554 <span class="mdl-chip__text">Priority 5/10</span>
555 </span>
556 </div>
557 </div>
558 <div class="mdl-card__actions mdl-card--border">
559 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationExportedServiceLink" onclick="reveal('explanationExportedService');">
560 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="ExportedServiceCardLink" onclick="hideid('ExportedServiceCard');">
561 Dismiss</button> </div>
562 </div>
563 </section>
564 <a name="Performance"></a>
565 <a name="Overdraw"></a>
566 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="OverdrawCard" style="display: block;">
567 <div class="mdl-card mdl-cell mdl-cell--12-col">
568 <div class="mdl-card__title">
569 <h2 class="mdl-card__title-text">Overdraw: Painting regions more than once</h2>
570 </div>
571 <div class="mdl-card__supporting-text">
572 <div class="issue">
573 <div class="warningslist">
574 <span class="location"><a href="../../src/main/res/layout/activity_main.xml">../../src/main/res/layout/activity_main.xml</a>:5</span>: <span class="message">Possible overdraw: Root element paints background <code>#111827</code> with a theme that also paints a background (inferred theme is <code>@style/AppTheme</code>)</span><br /><pre class="errorlines">
575 <span class="lineno"> 2 </span><span class="tag">&lt;FrameLayout</span><span class="attribute"> </span><span class="prefix">xmlns:</span><span class="attribute">android</span>=<span class="value">"http://schemas.android.com/apk/res/android"</span>
576 <span class="lineno"> 3 </span> <span class="prefix">android:</span><span class="attribute">layout_width</span>=<span class="value">"match_parent"</span>
577 <span class="lineno"> 4 </span> <span class="prefix">android:</span><span class="attribute">layout_height</span>=<span class="value">"match_parent"</span>
578 <span class="caretline"><span class="lineno"> 5 </span> <span class="warning"><span class="prefix">android:</span><span class="attribute">background</span>=<span class="value">"#111827"</span></span>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
579 <span class="lineno"> 6 </span>
580 <span class="lineno"> 7 </span> <span class="tag">&lt;ImageView</span><span class="attribute">
581 </span><span class="lineno"> 8 </span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">layout_width</span>=<span class="value">"128dp"</span>
582 </pre>
583
584 </div>
585 <div class="metadata"><div class="explanation" id="explanationOverdraw" style="display: none;">
586 If you set a background drawable on a root view, then you should use a custom theme where the theme background is null. Otherwise, the theme background will be painted first, only to have your custom background completely cover it; this is called "overdraw".<br/>
587 <br/>
588 NOTE: This detector relies on figuring out which layouts are associated with which activities based on scanning the Java code, and it's currently doing that using an inexact pattern matching algorithm. Therefore, it can incorrectly conclude which activity the layout is associated with and then wrongly complain that a background-theme is hidden.<br/>
589 <br/>
590 If you want your custom background on multiple pages, then you should consider making a custom theme with your custom background and just using that theme instead of a root element background.<br/>
591 <br/>
592 Of course it's possible that your custom drawable is translucent and you want it to be mixed with the background. However, you will get better performance if you pre-mix the background with your drawable and use that resulting image or color as a custom theme background instead.<br/>To suppress this error, use the issue id "Overdraw" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
593 <br/></div>
594 </div>
595 </div>
596 <div class="chips">
597 <span class="mdl-chip">
598 <span class="mdl-chip__text">Overdraw</span>
599 </span>
600 <span class="mdl-chip">
601 <span class="mdl-chip__text">Performance</span>
602 </span>
603 <span class="mdl-chip">
604 <span class="mdl-chip__text">Warning</span>
605 </span>
606 <span class="mdl-chip">
607 <span class="mdl-chip__text">Priority 3/10</span>
608 </span>
609 </div>
610 </div>
611 <div class="mdl-card__actions mdl-card--border">
612 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationOverdrawLink" onclick="reveal('explanationOverdraw');">
613 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="OverdrawCardLink" onclick="hideid('OverdrawCard');">
614 Dismiss</button> </div>
615 </div>
616 </section><a name="UnusedResources"></a>
617 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="UnusedResourcesCard" style="display: block;">
618 <div class="mdl-card mdl-cell mdl-cell--12-col">
619 <div class="mdl-card__title">
620 <h2 class="mdl-card__title-text">Unused resources</h2>
621 </div>
622 <div class="mdl-card__supporting-text">
623 <div class="issue">
624 <div class="warningslist">
625 <span class="location"><a href="../../src/main/res/layout/activity_main.xml">../../src/main/res/layout/activity_main.xml</a>:2</span>: <span class="message">The resource <code>R.layout.activity_main</code> appears to be unused</span><br /><pre class="errorlines">
626 <span class="lineno"> 1 </span><span class="prologue">&lt;?xml version="1.0" encoding="utf-8"?></span>
627 <span class="caretline"><span class="lineno"> 2 </span><span class="warning"><span class="tag">&lt;FrameLayout</span><span class="attribute"> </span><span class="prefix">xmlns:</span><span class="attribute">android</span>=<span class="value">"http://schemas.android.com/apk/res/android"</span> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
628 <span class="lineno"> 3 </span> <span class="prefix">android:</span><span class="attribute">layout_width</span>=<span class="value">"match_parent"</span>
629 <span class="lineno"> 4 </span> <span class="prefix">android:</span><span class="attribute">layout_height</span>=<span class="value">"match_parent"</span>
630 <span class="lineno"> 5 </span> <span class="prefix">android:</span><span class="attribute">background</span>=<span class="value">"#111827"</span>>
631 </pre>
632
633 <span class="location"><a href="../../src/main/res/values/colors.xml">../../src/main/res/values/colors.xml</a>:4</span>: <span class="message">The resource <code>R.color.colorPrimaryDark</code> appears to be unused</span><br /><pre class="errorlines">
634 <span class="lineno"> 1 </span><span class="prologue">&lt;?xml version="1.0" encoding="utf-8"?></span>
635 <span class="lineno"> 2 </span><span class="tag">&lt;resources></span>
636 <span class="lineno"> 3 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"colorPrimary"</span>>#2563EB<span class="tag">&lt;/color></span>
637 <span class="caretline"><span class="lineno"> 4 </span> <span class="tag">&lt;color</span><span class="attribute"> </span><span class="warning"><span class="attribute">name</span>=<span class="value">"colorPrimaryDark"</span></span>>#1D4ED8<span class="tag">&lt;/color></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
638 <span class="lineno"> 5 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"colorAccent"</span>>#2563EB<span class="tag">&lt;/color></span>
639 <span class="lineno"> 6 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"windowBackground"</span>>#111827<span class="tag">&lt;/color></span>
640 <span class="lineno"> 7 </span><span class="tag">&lt;/resources></span>
641 </pre>
642
643 <span class="location"><a href="../../src/main/res/values/colors.xml">../../src/main/res/values/colors.xml</a>:5</span>: <span class="message">The resource <code>R.color.colorAccent</code> appears to be unused</span><br /><pre class="errorlines">
644 <span class="lineno"> 2 </span><span class="tag">&lt;resources></span>
645 <span class="lineno"> 3 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"colorPrimary"</span>>#2563EB<span class="tag">&lt;/color></span>
646 <span class="lineno"> 4 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"colorPrimaryDark"</span>>#1D4ED8<span class="tag">&lt;/color></span>
647 <span class="caretline"><span class="lineno"> 5 </span> <span class="tag">&lt;color</span><span class="attribute"> </span><span class="warning"><span class="attribute">name</span>=<span class="value">"colorAccent"</span></span>>#2563EB<span class="tag">&lt;/color></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
648 <span class="lineno"> 6 </span> <span class="tag">&lt;color</span><span class="attribute"> name</span>=<span class="value">"windowBackground"</span>>#111827<span class="tag">&lt;/color></span>
649 <span class="lineno"> 7 </span><span class="tag">&lt;/resources></span>
650 </pre>
651
652 </div>
653 <div class="metadata"><div class="explanation" id="explanationUnusedResources" style="display: none;">
654 Unused resources make applications larger and slow down builds.<br/>
655 <br/>
656 <br/>
657 The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead.<br/>
658 <br/>
659 You can include test sources in the unused resource check by setting the system property <code>lint.unused-resources.include-tests=true</code>, and to exclude them (usually for performance reasons), use <code>lint.unused-resources.exclude-tests=true</code>.<br/>
660 <br/><br/>
661 This check can be configured via the following options:<br/><br/>
662 <div class="options">
663 <b>skip-libraries</b> (default is true):<br/>
664 Whether the unused resource check should skip reporting unused resources in libraries.<br/>
665 <br/>
666 Many libraries will declare resources that are part of the library surface; other modules depending on the library will also reference the resources. To avoid reporting all these resources as unused (in the context of a library), the unused resource check normally skips reporting unused resources in libraries. Instead, run the unused resource check on the consuming app module (along with <code>checkDependencies=true</code>).<br/>
667 <br/>
668 However, there are cases where you want to check that all the resources declared in a library are used; in that case, you can disable the skip option.<br/>
669 <br/>
670 To configure this option, use a `lint.xml` file in the project or source folder using an <code>&lt;option&gt;</code> block like the following:
671 <pre class="errorlines">
672 <span class="lineno"> 1 </span><span class="tag">&lt;lint></span>
673 <span class="lineno"> 2 </span> <span class="tag">&lt;issue</span><span class="attribute"> id</span>=<span class="value">"UnusedResources"</span>>
674 <span class="caretline"><span class="lineno"> 3 </span> <span class="tag">&lt;option</span><span class="attribute"> name</span>=<span class="warning"><span class="value">"skip-libraries"</span> <span class="attribute">value</span>=<span class="value">"true"</span></span> />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
675 <span class="lineno"> 4 </span> <span class="tag">&lt;/issue></span>
676 <span class="lineno"> 5 </span><span class="tag">&lt;/lint></span>
677 </pre>
678 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
679 To suppress this error, use the issue id "UnusedResources" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
680 <br/></div>
681 </div>
682 </div>
683 <div class="chips">
684 <span class="mdl-chip">
685 <span class="mdl-chip__text">UnusedResources</span>
686 </span>
687 <span class="mdl-chip">
688 <span class="mdl-chip__text">Performance</span>
689 </span>
690 <span class="mdl-chip">
691 <span class="mdl-chip__text">Warning</span>
692 </span>
693 <span class="mdl-chip">
694 <span class="mdl-chip__text">Priority 3/10</span>
695 </span>
696 </div>
697 </div>
698 <div class="mdl-card__actions mdl-card--border">
699 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationUnusedResourcesLink" onclick="reveal('explanationUnusedResources');">
700 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="UnusedResourcesCardLink" onclick="hideid('UnusedResourcesCard');">
701 Dismiss</button> </div>
702 </div>
703 </section>
704 <a name="Usability:Icons"></a>
705 <a name="MonochromeLauncherIcon"></a>
706 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MonochromeLauncherIconCard" style="display: block;">
707 <div class="mdl-card mdl-cell mdl-cell--12-col">
708 <div class="mdl-card__title">
709 <h2 class="mdl-card__title-text">Monochrome icon is not defined</h2>
710 </div>
711 <div class="mdl-card__supporting-text">
712 <div class="issue">
713 <div class="warningslist">
714 <span class="location"><a href="../../src/main/res/mipmap-anydpi-v26/ic_launcher.xml">../../src/main/res/mipmap-anydpi-v26/ic_launcher.xml</a>:2</span>: <span class="message">The application adaptive icon is missing a monochrome tag</span><br /><pre class="errorlines">
715 <span class="lineno"> 1 </span><span class="prologue">&lt;?xml version="1.0" encoding="utf-8"?></span>
716 <span class="caretline"><span class="lineno"> 2 </span><span class="warning"><span class="tag">&lt;adaptive-icon</span><span class="attribute"> </span><span class="prefix">xmlns:</span><span class="attribute">android</span>=<span class="value">"http://schemas.android.com/apk/res/android"</span>> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
717 <span class="lineno"> 3 </span> <span class="tag">&lt;background</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">drawable</span>=<span class="value">"@drawable/ic_launcher_background"</span> />
718 <span class="lineno"> 4 </span> <span class="tag">&lt;foreground</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">drawable</span>=<span class="value">"@drawable/ic_launcher_foreground"</span> />
719 <span class="lineno"> 5 </span><span class="tag">&lt;/adaptive-icon></span>
720 </pre>
721
722 <span class="location"><a href="../../src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml">../../src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml</a>:2</span>: <span class="message">The application adaptive roundIcon is missing a monochrome tag</span><br /><pre class="errorlines">
723 <span class="lineno"> 1 </span><span class="prologue">&lt;?xml version="1.0" encoding="utf-8"?></span>
724 <span class="caretline"><span class="lineno"> 2 </span><span class="warning"><span class="tag">&lt;adaptive-icon</span><span class="attribute"> </span><span class="prefix">xmlns:</span><span class="attribute">android</span>=<span class="value">"http://schemas.android.com/apk/res/android"</span>> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
725 <span class="lineno"> 3 </span> <span class="tag">&lt;background</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">drawable</span>=<span class="value">"@drawable/ic_launcher_background"</span> />
726 <span class="lineno"> 4 </span> <span class="tag">&lt;foreground</span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">drawable</span>=<span class="value">"@drawable/ic_launcher_foreground"</span> />
727 <span class="lineno"> 5 </span><span class="tag">&lt;/adaptive-icon></span>
728 </pre>
729
730 </div>
731 <div class="metadata"><div class="explanation" id="explanationMonochromeLauncherIcon" style="display: none;">
732 The system may use the coloring of the user's chosen wallpaper and theme to tint app icons. Providing a <code>&lt;monochrome></code> layer (which will be used for tinting) for every adaptive icon is strongly recommended, otherwise Android 16 QPR 2 and above will simply tint the color version of the icon, which may look unusual. Devices running earlier Android versions will (with no monochrome layer) show the untinted color icon for your app, which will look inconsistent.<br/>To suppress this error, use the issue id "MonochromeLauncherIcon" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
733 <br/></div>
734 </div>
735 </div>
736 <div class="chips">
737 <span class="mdl-chip">
738 <span class="mdl-chip__text">MonochromeLauncherIcon</span>
739 </span>
740 <span class="mdl-chip">
741 <span class="mdl-chip__text">Icons</span>
742 </span>
743 <span class="mdl-chip">
744 <span class="mdl-chip__text">Usability</span>
745 </span>
746 <span class="mdl-chip">
747 <span class="mdl-chip__text">Warning</span>
748 </span>
749 <span class="mdl-chip">
750 <span class="mdl-chip__text">Priority 6/10</span>
751 </span>
752 </div>
753 </div>
754 <div class="mdl-card__actions mdl-card--border">
755 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationMonochromeLauncherIconLink" onclick="reveal('explanationMonochromeLauncherIcon');">
756 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="MonochromeLauncherIconCardLink" onclick="hideid('MonochromeLauncherIconCard');">
757 Dismiss</button> </div>
758 </div>
759 </section>
760 <a name="Accessibility"></a>
761 <a name="ContentDescription"></a>
762 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="ContentDescriptionCard" style="display: block;">
763 <div class="mdl-card mdl-cell mdl-cell--12-col">
764 <div class="mdl-card__title">
765 <h2 class="mdl-card__title-text">Image without contentDescription</h2>
766 </div>
767 <div class="mdl-card__supporting-text">
768 <div class="issue">
769 <div class="warningslist">
770 <span class="location"><a href="../../src/main/res/layout/activity_main.xml">../../src/main/res/layout/activity_main.xml</a>:7</span>: <span class="message">Missing <code>contentDescription</code> attribute on image</span><br /><pre class="errorlines">
771 <span class="lineno"> 4 </span> <span class="prefix">android:</span><span class="attribute">layout_height</span>=<span class="value">"match_parent"</span>
772 <span class="lineno"> 5 </span> <span class="prefix">android:</span><span class="attribute">background</span>=<span class="value">"#111827"</span>>
773 <span class="lineno"> 6 </span>
774 <span class="caretline"><span class="lineno"> 7 </span> <span class="tag">&lt;</span><span class="warning"><span class="tag">ImageView</span></span><span class="attribute"> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="attribute">
775 </span><span class="lineno"> 8 </span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">layout_width</span>=<span class="value">"128dp"</span>
776 <span class="lineno"> 9 </span> <span class="prefix">android:</span><span class="attribute">layout_height</span>=<span class="value">"128dp"</span>
777 <span class="lineno"> 10 </span> <span class="prefix">android:</span><span class="attribute">layout_gravity</span>=<span class="value">"center"</span>
778 </pre>
779
780 </div>
781 <div class="metadata"><div class="explanation" id="explanationContentDescription" style="display: none;">
782 Non-textual widgets like ImageViews and ImageButtons should use the <code>contentDescription</code> attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface.<br/>
783 <br/>
784 Note that elements in application screens that are purely decorative and do not provide any content or enable a user action should not have accessibility content descriptions. In this case, set their descriptions to <code>@null</code>. If your app's minSdkVersion is 16 or higher, you can instead set these graphical elements' <code>android:importantForAccessibility</code> attributes to <code>no</code>.<br/>
785 <br/>
786 Note that for text fields, you should not set both the <code>hint</code> and the <code>contentDescription</code> attributes since the hint will never be shown. Just set the <code>hint</code>.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/guide/topics/ui/accessibility/apps#special-cases">https://developer.android.com/guide/topics/ui/accessibility/apps#special-cases</a>
787 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
788 To suppress this error, use the issue id "ContentDescription" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
789 <br/></div>
790 </div>
791 </div>
792 <div class="chips">
793 <span class="mdl-chip">
794 <span class="mdl-chip__text">ContentDescription</span>
795 </span>
796 <span class="mdl-chip">
797 <span class="mdl-chip__text">Accessibility</span>
798 </span>
799 <span class="mdl-chip">
800 <span class="mdl-chip__text">Warning</span>
801 </span>
802 <span class="mdl-chip">
803 <span class="mdl-chip__text">Priority 3/10</span>
804 </span>
805 </div>
806 </div>
807 <div class="mdl-card__actions mdl-card--border">
808 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationContentDescriptionLink" onclick="reveal('explanationContentDescription');">
809 Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="ContentDescriptionCardLink" onclick="hideid('ContentDescriptionCard');">
810 Dismiss</button> </div>
811 </div>
812 </section>
813 <a name="ExtraIssues"></a>
814 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="ExtraIssuesCard" style="display: block;">
815 <div class="mdl-card mdl-cell mdl-cell--12-col">
816 <div class="mdl-card__title">
817 <h2 class="mdl-card__title-text">Included Additional Checks</h2>
818 </div>
819 <div class="mdl-card__supporting-text">
820 This card lists all the extra checks run by lint, provided from libraries,
821 build configuration and extra flags. This is included to help you verify
822 whether a particular check is included in analysis when configuring builds.
823 (Note that the list does not include the hundreds of built-in checks into lint,
824 only additional ones.)
825 <div id="IncludedIssues" style="display: none;"><br/><br/><div class="issue">
826 <div class="id">EnsureInitializerMetadata<div class="issueSeparator"></div>
827 </div>
828 <div class="metadata"><div class="explanation">
829 When a library defines a Initializer, it needs to be accompanied by a corresponding &lt;meta-data> entry in the AndroidManifest.xml file.<br/><div class="vendor">
830 Vendor: Android Open Source Project<br/>
831 Identifier: androidx.startup<br/>
832 Feedback: <a href="https://issuetracker.google.com/issues/new?component=823348">https://issuetracker.google.com/issues/new?component=823348</a><br/>
833 </div>
834 <br/>
835 <br/></div>
836 </div>
837 </div>
838 <div class="issue">
839 <div class="id">EnsureInitializerNoArgConstr<div class="issueSeparator"></div>
840 </div>
841 <div class="metadata"><div class="explanation">
842 Every <code>Initializer</code> must have a no argument constructor.<br/><div class="vendor">
843 Vendor: Android Open Source Project<br/>
844 Identifier: androidx.startup<br/>
845 Feedback: <a href="https://issuetracker.google.com/issues/new?component=823348">https://issuetracker.google.com/issues/new?component=823348</a><br/>
846 </div>
847 <br/>
848 <br/></div>
849 </div>
850 </div>
851 <div class="issue">
852 <div class="id">ExperimentalAnnotationRetention<div class="issueSeparator"></div>
853 </div>
854 <div class="metadata"><div class="explanation">
855 Experimental annotations defined in Java source should use default (<code>CLASS</code>) retention, while Kotlin-sourced annotations should use <code>BINARY</code> retention.<br/><div class="vendor">
856 Vendor: Android Open Source Project<br/>
857 Identifier: androidx.annotation.experimental<br/>
858 Feedback: <a href="https://issuetracker.google.com/issues/new?component=459778">https://issuetracker.google.com/issues/new?component=459778</a><br/>
859 </div>
860 <br/>
861 <br/></div>
862 </div>
863 </div>
864 <div class="issue">
865 <div class="id">FragmentBackPressedCallback<div class="issueSeparator"></div>
866 </div>
867 <div class="metadata"><div class="explanation">
868 The Fragment lifecycle can result in a Fragment being active longer than its view. This can lead to unexpected behavior from lifecycle aware objects remaining active longer than the Fragment's view. To solve this issue, getViewLifecycleOwner() should be used as a LifecycleOwner rather than the Fragment instance once it is safe to access the view lifecycle in a Fragment's onCreateView, onViewCreated, onActivityCreated, or onViewStateRestored methods.<br/><div class="vendor">
869 Vendor: Android Open Source Project (androidx.fragment.lint.fragment)<br/>
870 Identifier: androidx.fragment.lint.fragment<br/>
871 Feedback: <a href="https://issuetracker.google.com/issues/new?component=192731">https://issuetracker.google.com/issues/new?component=192731</a><br/>
872 </div>
873 <br/>
874 <br/></div>
875 </div>
876 </div>
877 <div class="issue">
878 <div class="id">FragmentLiveDataObserve<div class="issueSeparator"></div>
879 </div>
880 <div class="metadata"><div class="explanation">
881 When observing a LiveData object from a fragment's onCreateView, onViewCreated, onActivityCreated, or onViewStateRestored method getViewLifecycleOwner() should be used as the LifecycleOwner rather than the Fragment instance. The Fragment lifecycle can result in the Fragment being active longer than its view. This can lead to unexpected behavior from LiveData objects being observed longer than the Fragment's view is active.<br/><div class="vendor">
882 Vendor: Android Open Source Project (androidx.fragment.lint.fragment)<br/>
883 Identifier: androidx.fragment.lint.fragment<br/>
884 Feedback: <a href="https://issuetracker.google.com/issues/new?component=192731">https://issuetracker.google.com/issues/new?component=192731</a><br/>
885 </div>
886 <br/>
887 <br/></div>
888 </div>
889 </div>
890 <div class="issue">
891 <div class="id">FragmentTagUsage<div class="issueSeparator"></div>
892 </div>
893 <div class="metadata"><div class="explanation">
894 FragmentContainerView replaces the &lt;fragment> tag as the preferred way of adding fragments via XML. Unlike the &lt;fragment> tag, FragmentContainerView uses a normal <code>FragmentTransaction</code> under the hood to add the initial fragment, allowing further FragmentTransaction operations on the FragmentContainerView and providing a consistent timing for lifecycle events.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/reference/androidx/fragment/app/FragmentContainerView.html">https://developer.android.com/reference/androidx/fragment/app/FragmentContainerView.html</a>
895 </div><div class="vendor">
896 Vendor: Android Open Source Project (androidx.fragment.lint.fragment)<br/>
897 Identifier: androidx.fragment.lint.fragment<br/>
898 Feedback: <a href="https://issuetracker.google.com/issues/new?component=192731">https://issuetracker.google.com/issues/new?component=192731</a><br/>
899 </div>
900 <br/>
901 <br/></div>
902 </div>
903 </div>
904 <div class="issue">
905 <div class="id">InvalidFragmentVersionForActivityResult<div class="issueSeparator"></div>
906 </div>
907 <div class="metadata"><div class="explanation">
908 In order to use the ActivityResult APIs you must upgrade your Fragment version to 1.3.0. Previous versions of FragmentActivity failed to call super.onRequestPermissionsResult() and used invalid request codes<br/><div class="moreinfo">More info: <a href="https://developer.android.com/training/permissions/requesting#make-the-request">https://developer.android.com/training/permissions/requesting#make-the-request</a>
909 </div><div class="vendor">
910 Vendor: Android Open Source Project<br/>
911 Identifier: androidx.activity<br/>
912 Feedback: <a href="https://issuetracker.google.com/issues/new?component=527362">https://issuetracker.google.com/issues/new?component=527362</a><br/>
913 </div>
914 <br/>
915 <br/></div>
916 </div>
917 </div>
918 <div class="issue">
919 <div class="id">UnsafeOptInUsageError<div class="issueSeparator"></div>
920 </div>
921 <div class="metadata"><div class="explanation">
922 This API has been flagged as opt-in with error-level severity.<br/>
923 <br/>
924 Any declaration annotated with this marker is considered part of an unstable or<br/>
925 otherwise non-standard API surface and its call sites should accept the opt-in<br/>
926 aspect of it by using the <code>@OptIn</code> annotation, using the marker annotation --<br/>
927 effectively causing further propagation of the opt-in aspect -- or configuring<br/>
928 the <code>UnsafeOptInUsageError</code> check's options for project-wide opt-in.<br/>
929 <br/>
930 To configure project-wide opt-in, specify the <code>opt-in</code> option value in <code>lint.xml</code><br/>
931 as a comma-delimited list of opted-in annotations:<br/>
932
933 <pre>
934 &lt;lint>
935 &lt;issue id="UnsafeOptInUsageError">
936 &lt;option name="opt-in" value="com.foo.ExperimentalBarAnnotation" />
937 &lt;/issue>
938 &lt;/lint>
939 </pre>
940 <br/><div class="vendor">
941 Vendor: Android Open Source Project<br/>
942 Identifier: androidx.annotation.experimental<br/>
943 Feedback: <a href="https://issuetracker.google.com/issues/new?component=459778">https://issuetracker.google.com/issues/new?component=459778</a><br/>
944 </div>
945 <br/>
946 <br/></div>
947 </div>
948 </div>
949 <div class="issue">
950 <div class="id">UnsafeOptInUsageWarning<div class="issueSeparator"></div>
951 </div>
952 <div class="metadata"><div class="explanation">
953 This API has been flagged as opt-in with warning-level severity.<br/>
954 <br/>
955 Any declaration annotated with this marker is considered part of an unstable or<br/>
956 otherwise non-standard API surface and its call sites should accept the opt-in<br/>
957 aspect of it by using the <code>@OptIn</code> annotation, using the marker annotation --<br/>
958 effectively causing further propagation of the opt-in aspect -- or configuring<br/>
959 the <code>UnsafeOptInUsageWarning</code> check's options for project-wide opt-in.<br/>
960 <br/>
961 To configure project-wide opt-in, specify the <code>opt-in</code> option value in <code>lint.xml</code><br/>
962 as a comma-delimited list of opted-in annotations:<br/>
963
964 <pre>
965 &lt;lint>
966 &lt;issue id="UnsafeOptInUsageWarning">
967 &lt;option name="opt-in" value="com.foo.ExperimentalBarAnnotation" />
968 &lt;/issue>
969 &lt;/lint>
970 </pre>
971 <br/><div class="vendor">
972 Vendor: Android Open Source Project<br/>
973 Identifier: androidx.annotation.experimental<br/>
974 Feedback: <a href="https://issuetracker.google.com/issues/new?component=459778">https://issuetracker.google.com/issues/new?component=459778</a><br/>
975 </div>
976 <br/>
977 <br/></div>
978 </div>
979 </div>
980 <div class="issue">
981 <div class="id">UseAndroidAlpha<div class="issueSeparator"></div>
982 </div>
983 <div class="metadata"><div class="explanation">
984 <code>ColorStateList</code> uses app:alpha without <code>android:alpha</code><br/><div class="vendor">
985 Vendor: Android Open Source Project<br/>
986 Identifier: androidx.appcompat<br/>
987 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
988 </div>
989 <br/>
990 <br/></div>
991 </div>
992 </div>
993 <div class="issue">
994 <div class="id">UseAppTint<div class="issueSeparator"></div>
995 </div>
996 <div class="metadata"><div class="explanation">
997 <code>ImageView</code> or <code>ImageButton</code> uses <code>android:tint</code> instead of <code>app:tint</code><br/><div class="vendor">
998 Vendor: Android Open Source Project<br/>
999 Identifier: androidx.appcompat<br/>
1000 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1001 </div>
1002 <br/>
1003 <br/></div>
1004 </div>
1005 </div>
1006 <div class="issue">
1007 <div class="id">UseCompatLoadingForColorStateLists<div class="issueSeparator"></div>
1008 </div>
1009 <div class="metadata"><div class="explanation">
1010 Use Compat loading of color state lists<br/><div class="vendor">
1011 Vendor: Android Open Source Project<br/>
1012 Identifier: androidx.appcompat<br/>
1013 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1014 </div>
1015 <br/>
1016 <br/></div>
1017 </div>
1018 </div>
1019 <div class="issue">
1020 <div class="id">UseCompatLoadingForDrawables<div class="issueSeparator"></div>
1021 </div>
1022 <div class="metadata"><div class="explanation">
1023 Use Compat loading of drawables<br/><div class="vendor">
1024 Vendor: Android Open Source Project<br/>
1025 Identifier: androidx.appcompat<br/>
1026 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1027 </div>
1028 <br/>
1029 <br/></div>
1030 </div>
1031 </div>
1032 <div class="issue">
1033 <div class="id">UseCompatTextViewDrawableApis<div class="issueSeparator"></div>
1034 </div>
1035 <div class="metadata"><div class="explanation">
1036 Use Compat loading of compound text view drawables<br/><div class="vendor">
1037 Vendor: Android Open Source Project<br/>
1038 Identifier: androidx.appcompat<br/>
1039 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1040 </div>
1041 <br/>
1042 <br/></div>
1043 </div>
1044 </div>
1045 <div class="issue">
1046 <div class="id">UseCompatTextViewDrawableXml<div class="issueSeparator"></div>
1047 </div>
1048 <div class="metadata"><div class="explanation">
1049 <code>TextView</code> uses <code>android:</code> compound drawable attributes instead of <code>app:</code> ones<br/><div class="vendor">
1050 Vendor: Android Open Source Project<br/>
1051 Identifier: androidx.appcompat<br/>
1052 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1053 </div>
1054 <br/>
1055 <br/></div>
1056 </div>
1057 </div>
1058 <div class="issue">
1059 <div class="id">UseRequireInsteadOfGet<div class="issueSeparator"></div>
1060 </div>
1061 <div class="metadata"><div class="explanation">
1062 AndroidX added new "require____()" versions of common "get___()" APIs, such as getContext/getActivity/getArguments/etc. Rather than wrap these in something like requireNotNull(), using these APIs will allow the underlying component to try to tell you _why_ it was null, and thus yield a better error message.<br/><div class="vendor">
1063 Vendor: Android Open Source Project (androidx.fragment.lint.fragment)<br/>
1064 Identifier: androidx.fragment.lint.fragment<br/>
1065 Feedback: <a href="https://issuetracker.google.com/issues/new?component=192731">https://issuetracker.google.com/issues/new?component=192731</a><br/>
1066 </div>
1067 <br/>
1068 <br/></div>
1069 </div>
1070 </div>
1071 <div class="issue">
1072 <div class="id">UseSupportActionBar<div class="issueSeparator"></div>
1073 </div>
1074 <div class="metadata"><div class="explanation">
1075 Use <code>AppCompatActivity.setSupportActionBar</code><br/><div class="vendor">
1076 Vendor: Android Open Source Project<br/>
1077 Identifier: androidx.appcompat<br/>
1078 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1079 </div>
1080 <br/>
1081 <br/></div>
1082 </div>
1083 </div>
1084 <div class="issue">
1085 <div class="id">UseSwitchCompatOrMaterialCode<div class="issueSeparator"></div>
1086 </div>
1087 <div class="metadata"><div class="explanation">
1088 Use <code>SwitchCompat</code> from AppCompat or <code>SwitchMaterial</code> from Material library<br/><div class="vendor">
1089 Vendor: Android Open Source Project<br/>
1090 Identifier: androidx.appcompat<br/>
1091 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1092 </div>
1093 <br/>
1094 <br/></div>
1095 </div>
1096 </div>
1097 <div class="issue">
1098 <div class="id">UseSwitchCompatOrMaterialXml<div class="issueSeparator"></div>
1099 </div>
1100 <div class="metadata"><div class="explanation">
1101 Use <code>SwitchCompat</code> from AppCompat or <code>SwitchMaterial</code> from Material library<br/><div class="vendor">
1102 Vendor: Android Open Source Project<br/>
1103 Identifier: androidx.appcompat<br/>
1104 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1105 </div>
1106 <br/>
1107 <br/></div>
1108 </div>
1109 </div>
1110 <div class="issue">
1111 <div class="id">UsingOnClickInXml<div class="issueSeparator"></div>
1112 </div>
1113 <div class="metadata"><div class="explanation">
1114 Old versions of the platform do not properly support resolving <code>android:onClick</code><br/><div class="vendor">
1115 Vendor: Android Open Source Project<br/>
1116 Identifier: androidx.appcompat<br/>
1117 Feedback: <a href="https://issuetracker.google.com/issues/new?component=460343">https://issuetracker.google.com/issues/new?component=460343</a><br/>
1118 </div>
1119 <br/>
1120 <br/></div>
1121 </div>
1122 </div>
1123 </div>
1124 </div>
1125 <div class="mdl-card__actions mdl-card--border">
1126 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="IncludedIssuesLink" onclick="reveal('IncludedIssues');">
1127 List Issues</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="ExtraIssuesCardLink" onclick="hideid('ExtraIssuesCard');">
1128 Dismiss</button> </div>
1129 </div>
1130 </section>
1131 <a name="MissingIssues"></a>
1132 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MissingIssuesCard" style="display: block;">
1133 <div class="mdl-card mdl-cell mdl-cell--12-col">
1134 <div class="mdl-card__title">
1135 <h2 class="mdl-card__title-text">Disabled Checks</h2>
1136 </div>
1137 <div class="mdl-card__supporting-text">
1138 One or more issues were not run by lint, either
1139 because the check is not enabled by default, or because
1140 it was disabled with a command line flag or via one or
1141 more <code>lint.xml</code> configuration files in the project directories.
1142 <div id="SuppressedIssues" style="display: none;"><br/><br/><div class="issue">
1143 <div class="id">AppCompatMethod<div class="issueSeparator"></div>
1144 </div>
1145 <div class="metadata">Disabled By: Default<br/>
1146 <div class="explanation">
1147 When using the appcompat library, there are some methods you should be calling instead of the normal ones; for example, <code>getSupportActionBar()</code> instead of <code>getActionBar()</code>. This lint check looks for calls to the wrong method.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/topic/libraries/support-library/">https://developer.android.com/topic/libraries/support-library/</a>
1148 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1149 <br/>
1150 <br/></div>
1151 </div>
1152 </div>
1153 <div class="issue">
1154 <div class="id">AppLinksAutoVerify<div class="issueSeparator"></div>
1155 </div>
1156 <div class="metadata">Disabled By: Default<br/>
1157 <div class="explanation">
1158 Ensures that app links are correctly set and associated with website.<br/><div class="moreinfo">More info: <a href="https://g.co/appindexing/applinks">https://g.co/appindexing/applinks</a>
1159 </div><br/>
1160 <br/></div>
1161 </div>
1162 </div>
1163 <div class="issue">
1164 <div class="id">BackButton<div class="issueSeparator"></div>
1165 </div>
1166 <div class="metadata">Disabled By: Default<br/>
1167 <div class="explanation">
1168 According to the Android Design Guide,<br/>
1169 <br/>
1170 "Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation."<br/>
1171 <br/>
1172 This check is not very sophisticated (it just looks for buttons with the label "Back"), so it is disabled by default to not trigger on common scenarios like pairs of Back/Next buttons to paginate through screens.<br/><div class="moreinfo">More info: <a href="https://d.android.com/r/studio-ui/designer/material/design">https://d.android.com/r/studio-ui/designer/material/design</a>
1173 </div><br/>
1174 <br/></div>
1175 </div>
1176 </div>
1177 <div class="issue">
1178 <div class="id">BidiSpoofing<div class="issueSeparator"></div>
1179 </div>
1180 <div class="metadata">Disabled By: Command line flag<br/>
1181 <div class="explanation">
1182 Unicode bidirectional text characters can alter the order in which the compiler processes tokens. However, this can also be used to hide malicious code, and can be difficult to spot. This lint check audits the source code and looks for cases where it looks like bidirectional text has the potential to be misleading.<br/><div class="moreinfo">More info: <ul><li><a href="https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/">https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/</a>
1183 <li><a href="https://goo.gle/BidiSpoofing">https://goo.gle/BidiSpoofing</a>
1184 </ul></div><br/>
1185 <br/></div>
1186 </div>
1187 </div>
1188 <div class="issue">
1189 <div class="id">ConvertToWebp<div class="issueSeparator"></div>
1190 </div>
1191 <div class="metadata">Disabled By: Default<br/>
1192 <div class="explanation">
1193 The WebP format is typically more compact than PNG and JPEG. As of Android 4.2.1 it supports transparency and lossless conversion as well. Note that there is a quickfix in the IDE which lets you perform conversion.<br/>
1194 <br/>
1195 Previously, launcher icons were required to be in the PNG format but that restriction is no longer there, so lint now flags these.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1196 <br/>
1197 <br/></div>
1198 </div>
1199 </div>
1200 <div class="issue">
1201 <div class="id">DalvikOverride<div class="issueSeparator"></div>
1202 </div>
1203 <div class="metadata">Disabled By: Default<br/>
1204 <div class="explanation">
1205 The Dalvik virtual machine will treat a package private method in one class as overriding a package private method in its super class, even if they are in separate packages.<br/>
1206 <br/>
1207 If you really did intend for this method to override the other, make the method <code>protected</code> instead.<br/>
1208 <br/>
1209 If you did <b>not</b> intend the override, consider making the method private, or changing its name or signature.<br/>
1210 <br/>
1211 Note that this check is disabled be default, because ART (the successor to Dalvik) no longer has this behavior.<br/><br/>
1212 <br/></div>
1213 </div>
1214 </div>
1215 <div class="issue">
1216 <div class="id">DefaultEncoding<div class="issueSeparator"></div>
1217 </div>
1218 <div class="metadata">Disabled By: Default<br/>
1219 <div class="explanation">
1220 Some APIs will implicitly use the default system character encoding instead of UTF-8 when converting to or from bytes, such as when creating a default <code>FileReader</code>.<br/>
1221 <br/>
1222 This is <i>usually</i> not correct; you only want to do this if you need to read files created by other programs where they have deliberately written in the same encoding. The default encoding varies from platform to platform and can vary from locale to locale, so this makes it difficult to interpret files containing non-ASCII characters.<br/>
1223 <br/>
1224 We recommend using UTF-8 everywhere.<br/>
1225 <br/>
1226 Note that on Android, the default file encoding is always UTF-8 (see <a href="https://developer.android.com/reference/java/nio/charset/Charset#defaultCharset(">https://developer.android.com/reference/java/nio/charset/Charset#defaultCharset(</a>) for more), so this lint check deliberately does not flag any problems in Android code, since it is always safe to rely on the default character encoding there.<br/><br/>
1227 <br/></div>
1228 </div>
1229 </div>
1230 <div class="issue">
1231 <div class="id">DuplicateStrings<div class="issueSeparator"></div>
1232 </div>
1233 <div class="metadata">Disabled By: Default<br/>
1234 <div class="explanation">
1235 Duplicate strings can make applications larger unnecessarily.<br/>
1236 <br/>
1237 This lint check looks for duplicate strings, including differences for strings where the only difference is in capitalization. Title casing and all uppercase can all be adjusted in the layout or in code.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType">https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType</a>
1238 </div><br/>
1239 <br/></div>
1240 </div>
1241 </div>
1242 <div class="issue">
1243 <div class="id">EasterEgg<div class="issueSeparator"></div>
1244 </div>
1245 <div class="metadata">Disabled By: Default<br/>
1246 <div class="explanation">
1247 An "easter egg" is code deliberately hidden in the code, both from potential users and even from other developers. This lint check looks for code which looks like it may be hidden from sight.<br/><br/>
1248 <br/></div>
1249 </div>
1250 </div>
1251 <div class="issue">
1252 <div class="id">ExpensiveAssertion<div class="issueSeparator"></div>
1253 </div>
1254 <div class="metadata">Disabled By: Default<br/>
1255 <div class="explanation">
1256 In Kotlin, assertions are not handled the same way as from the Java programming language. In particular, they're just implemented as a library call, and inside the library call the error is only thrown if assertions are enabled.<br/>
1257 <br/>
1258 This means that the arguments to the <code>assert</code> call will <b>always</b> be evaluated. If you're doing any computation in the expression being asserted, that computation will unconditionally be performed whether or not assertions are turned on. This typically turns into wasted work in release builds.<br/>
1259 <br/>
1260 This check looks for cases where the assertion condition is nontrivial, e.g. it is performing method calls or doing more work than simple comparisons on local variables or fields.<br/>
1261 <br/>
1262 You can work around this by writing your own inline assert method instead:<br/>
1263
1264 <pre>
1265 @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
1266 inline fun assert(condition: () -> Boolean) {
1267 if (_Assertions.ENABLED &amp;&amp; !condition()) {
1268 throw AssertionError()
1269 }
1270 }
1271 </pre>
1272 <br/>
1273 In Android, because assertions are not enforced at runtime, instead use this:<br/>
1274
1275 <pre>
1276 inline fun assert(condition: () -> Boolean) {
1277 if (BuildConfig.DEBUG &amp;&amp; !condition()) {
1278 throw AssertionError()
1279 }
1280 }
1281 </pre>
1282 <br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1283 <br/>
1284 <br/></div>
1285 </div>
1286 </div>
1287 <div class="issue">
1288 <div class="id">IconExpectedSize<div class="issueSeparator"></div>
1289 </div>
1290 <div class="metadata">Disabled By: Default<br/>
1291 <div class="explanation">
1292 There are predefined sizes (for each density) for launcher icons. You should follow these conventions to make sure your icons fit in with the overall look of the platform.<br/><div class="moreinfo">More info: <a href="https://d.android.com/r/studio-ui/designer/material/iconography">https://d.android.com/r/studio-ui/designer/material/iconography</a>
1293 </div><br/>
1294 <br/></div>
1295 </div>
1296 </div>
1297 <div class="issue">
1298 <div class="id">InvalidPackage<div class="issueSeparator"></div>
1299 </div>
1300 <div class="metadata">Disabled By: Default<br/>
1301 <div class="explanation">
1302 This check scans through libraries looking for calls to APIs that are not included in Android.<br/>
1303 <br/>
1304 When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.<br/>
1305 <br/>
1306 This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.<br/><br/>
1307 <br/></div>
1308 </div>
1309 </div>
1310 <div class="issue">
1311 <div class="id">KotlinPropertyAccess<div class="issueSeparator"></div>
1312 </div>
1313 <div class="metadata">Disabled By: Default<br/>
1314 <div class="explanation">
1315 For a method to be represented as a property in Kotlin, strict &#8220;bean&#8221;-style prefixing must be used.<br/>
1316 <br/>
1317 Accessor methods require a <code>get</code> prefix or for boolean-returning methods an <code>is</code> prefix can be used.<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#property-prefixes">https://android.github.io/kotlin-guides/interop.html#property-prefixes</a>
1318 </div><br/>
1319 <br/></div>
1320 </div>
1321 </div>
1322 <div class="issue">
1323 <div class="id">KotlincFE10<div class="issueSeparator"></div>
1324 </div>
1325 <div class="metadata">Disabled By: Default<br/>
1326 <div class="explanation">
1327 K2, the new version of Kotlin compiler, which encompasses the new frontend, is coming. Try to avoid using internal APIs from the old frontend if possible.<br/><br/>
1328 <br/></div>
1329 </div>
1330 </div>
1331 <div class="issue">
1332 <div class="id">LambdaLast<div class="issueSeparator"></div>
1333 </div>
1334 <div class="metadata">Disabled By: Default<br/>
1335 <div class="explanation">
1336 To improve calling this code from Kotlin, parameter types eligible for SAM conversion should be last.<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last">https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last</a>
1337 </div><br/>
1338 <br/></div>
1339 </div>
1340 </div>
1341 <div class="issue">
1342 <div class="id">LintDocExample<div class="issueSeparator"></div>
1343 </div>
1344 <div class="metadata">Disabled By: Default<br/>
1345 <div class="explanation">
1346 Lint's tool for generating documentation for each issue has special support for including a code example which shows how to trigger the report. It will pick the first unit test it can find and pick out the source file referenced from the error message, but you can instead designate a unit test to be the documentation example, and in that case, all the files are included.<br/>
1347 <br/>
1348 To designate a unit test as the documentation example for an issue, name the test <code>testDocumentationExample</code>, or if your detector reports multiple issues, <code>testDocumentationExample</code>&lt;Id>, such as <code>testDocumentationExampleMyId</code>.<br/><br/>
1349 <br/></div>
1350 </div>
1351 </div>
1352 <div class="issue">
1353 <div class="id">LintImplPsiEquals<div class="issueSeparator"></div>
1354 </div>
1355 <div class="metadata">Disabled By: Default<br/>
1356 <div class="explanation">
1357 You should never compare two PSI elements for equality with <code>equals</code>; use <code>PsiEquivalenceUtil.areElementsEquivalent(PsiElement, PsiElement)</code> instead.<br/><br/>
1358 <br/></div>
1359 </div>
1360 </div>
1361 <div class="issue">
1362 <div class="id">LintImplUnexpectedDomain<div class="issueSeparator"></div>
1363 </div>
1364 <div class="metadata">Disabled By: Default<br/>
1365 <div class="explanation">
1366 This checks flags URLs to domains that have not been explicitly allowed for use as a documentation source.<br/><br/>
1367 <br/></div>
1368 </div>
1369 </div>
1370 <div class="issue">
1371 <div class="id">LogConditional<div class="issueSeparator"></div>
1372 </div>
1373 <div class="metadata">Disabled By: Default<br/>
1374 <div class="explanation">
1375 The <code>BuildConfig</code> class provides a constant, <code>DEBUG</code>, which indicates whether the code is being built in release mode or in debug mode. In release mode, you typically want to strip out all the logging calls. Since the compiler will automatically remove all code which is inside a <code>if (false)</code> check, surrounding your logging calls with a check for <code>BuildConfig.DEBUG</code> is a good idea.<br/>
1376 <br/>
1377 If you <b>really</b> intend for the logging to be present in release mode, you can suppress this warning with a <code>@SuppressLint</code> annotation for the intentional logging calls.<br/><br/>
1378 <br/></div>
1379 </div>
1380 </div>
1381 <div class="issue">
1382 <div class="id">MangledCRLF<div class="issueSeparator"></div>
1383 </div>
1384 <div class="metadata">Disabled By: Default<br/>
1385 <div class="explanation">
1386 On Windows, line endings are typically recorded as carriage return plus newline: \r\n.<br/>
1387 <br/>
1388 This detector looks for invalid line endings with repeated carriage return characters (without newlines). Previous versions of the ADT plugin could accidentally introduce these into the file, and when editing the file, the editor could produce confusing visual artifacts.<br/><div class="moreinfo">More info: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421">https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421</a>
1389 </div><br/>
1390 <br/></div>
1391 </div>
1392 </div>
1393 <div class="issue">
1394 <div class="id">MemberExtensionConflict<div class="issueSeparator"></div>
1395 </div>
1396 <div class="metadata">Disabled By: Default<br/>
1397 <div class="explanation">
1398 When both member and extension declarations are applicable, the resolution takes the member. This also implies that, if an extension existed first, but then a member is added later, the same call-site may end up with different call resolutions depending on target environment. This results in a potential runtime exception if the generated binary (library or app) targets earlier environment (i.e., without the new member, but only extension). More concrete example is found at: <a href="https://issuetracker.google.com/issues/350432371">https://issuetracker.google.com/issues/350432371</a><br/><br/>
1399 <br/></div>
1400 </div>
1401 </div>
1402 <div class="issue">
1403 <div class="id">MinSdkTooLow<div class="issueSeparator"></div>
1404 </div>
1405 <div class="metadata">Disabled By: Default<br/>
1406 <div class="explanation">
1407 The value of the <code>minSdkVersion</code> property is too low and can be incremented without noticeably reducing the number of supported devices.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1408 <br/>
1409 <br/></div>
1410 </div>
1411 </div>
1412 <div class="issue">
1413 <div class="id">NegativeMargin<div class="issueSeparator"></div>
1414 </div>
1415 <div class="metadata">Disabled By: Default<br/>
1416 <div class="explanation">
1417 Margin values should be positive. Negative values are generally a sign that you are making assumptions about views surrounding the current one, or may be tempted to turn off child clipping to allow a view to escape its parent. Turning off child clipping to do this not only leads to poor graphical performance, it also results in wrong touch event handling since touch events are based strictly on a chain of parent-rect hit tests. Finally, making assumptions about the size of strings can lead to localization problems.<br/><br/>
1418 <br/></div>
1419 </div>
1420 </div>
1421 <div class="issue">
1422 <div class="id">NoHardKeywords<div class="issueSeparator"></div>
1423 </div>
1424 <div class="metadata">Disabled By: Default<br/>
1425 <div class="explanation">
1426 Do not use Kotlin&#8217;s hard keywords as the name of methods or fields. These require the use of backticks to escape when calling from Kotlin. Soft keywords, modifier keywords, and special identifiers are allowed.<br/>
1427 <br/>
1428 For example, ActionEvent's <code>getWhen()</code> method requires backticks when used from Kotlin:
1429 <pre>
1430 val timestamp = event.`when`
1431 </pre>
1432 <br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#no-hard-keywords">https://android.github.io/kotlin-guides/interop.html#no-hard-keywords</a>
1433 </div><br/>
1434 <br/></div>
1435 </div>
1436 </div>
1437 <div class="issue">
1438 <div class="id">NoOp<div class="issueSeparator"></div>
1439 </div>
1440 <div class="metadata">Disabled By: Default<br/>
1441 <div class="explanation">
1442 This check looks for code which looks like it's a no-op -- usually leftover expressions from interactive debugging, but in some cases bugs where you had intended to do something with the expression such as assign it to a field.<br/><br/>
1443 This check can be configured via the following options:<br/><br/>
1444 <div class="options">
1445 <b>pure-getters</b> (default is false):<br/>
1446 Whether to assume methods with getter-names have no side effects.<br/>
1447 <br/>
1448 Getter methods (where names start with <code>get</code> or <code>is</code>, and have non-void return types, and no arguments) should not have side effects. With this option turned on, lint will assume that is the case and will list any getter calls whose results are ignored as suspicious code.<br/>
1449 <br/>
1450 To configure this option, use a `lint.xml` file in the project or source folder using an <code>&lt;option&gt;</code> block like the following:
1451 <pre class="errorlines">
1452 <span class="lineno"> 1 </span><span class="tag">&lt;lint></span>
1453 <span class="lineno"> 2 </span> <span class="tag">&lt;issue</span><span class="attribute"> id</span>=<span class="value">"NoOp"</span>>
1454 <span class="caretline"><span class="lineno"> 3 </span> <span class="tag">&lt;option</span><span class="attribute"> name</span>=<span class="warning"><span class="value">"pure-getters"</span> <span class="attribute">value</span>=<span class="value">"false"</span></span> />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
1455 <span class="lineno"> 4 </span> <span class="tag">&lt;/issue></span>
1456 <span class="lineno"> 5 </span><span class="tag">&lt;/lint></span>
1457 </pre>
1458 </div><br/>
1459 <br/></div>
1460 </div>
1461 </div>
1462 <div class="issue">
1463 <div class="id">PermissionNamingConvention<div class="issueSeparator"></div>
1464 </div>
1465 <div class="metadata">Disabled By: Default<br/>
1466 <div class="explanation">
1467 Permissions should be prefixed with an app's package name, using reverse-domain-style naming. This prefix should be followed by <code>.permission.</code>, and then a description of the capability that the permission represents, in upper SNAKE_CASE. For example, <code>com.example.myapp.permission.ENGAGE_HYPERSPACE</code>.<br/>
1468 <br/>
1469 Following this recommendation avoids naming collisions, and helps clearly identify the owner and intention of a custom permission.<br/><br/>
1470 <br/></div>
1471 </div>
1472 </div>
1473 <div class="issue">
1474 <div class="id">ReflectionAnnotation<div class="issueSeparator"></div>
1475 </div>
1476 <div class="metadata">Disabled By: Default<br/>
1477 <div class="explanation">
1478 When methods are using reflection to access APIs, they should declare what APIs they are accessing using the new <code>@UsesReflectionToAccessMethod</code> and <code>@UsesReflectionToAccessField</code> annotations. This makes it possible for the shrinker (R8) to correctly remove unused code and resources without accidentally also removing reflectively accessed code, which can lead to program crashes.<br/><br/>
1479 <br/></div>
1480 </div>
1481 </div>
1482 <div class="issue">
1483 <div class="id">Registered<div class="issueSeparator"></div>
1484 </div>
1485 <div class="metadata">Disabled By: Default<br/>
1486 <div class="explanation">
1487 Activities, services and content providers should be registered in the <code>AndroidManifest.xml</code> file using <code>&lt;activity></code>, <code>&lt;service></code> and <code>&lt;provider></code> tags.<br/>
1488 <br/>
1489 If your activity is simply a parent class intended to be subclassed by other "real" activities, make it an abstract class.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/guide/topics/manifest/manifest-intro.html">https://developer.android.com/guide/topics/manifest/manifest-intro.html</a>
1490 </div><br/>
1491 <br/></div>
1492 </div>
1493 </div>
1494 <div class="issue">
1495 <div class="id">RequiredSize<div class="issueSeparator"></div>
1496 </div>
1497 <div class="metadata">Disabled By: Default<br/>
1498 <div class="explanation">
1499 All views must specify an explicit <code>layout_width</code> and <code>layout_height</code> attribute. There is a runtime check for this, so if you fail to specify a size, an exception is thrown at runtime.<br/>
1500 <br/>
1501 It's possible to specify these widths via styles as well. GridLayout, as a special case, does not require you to specify a size.<br/><br/>
1502 <br/></div>
1503 </div>
1504 </div>
1505 <div class="issue">
1506 <div class="id">SelectableText<div class="issueSeparator"></div>
1507 </div>
1508 <div class="metadata">Disabled By: Default<br/>
1509 <div class="explanation">
1510 If a <code>&lt;TextView></code> is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the <code>&lt;TextView></code> should specify <code>android:textIsSelectable="true"</code>.<br/>
1511 <br/>
1512 This lint check looks for TextViews which are likely to be displaying data: views whose text is set dynamically.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1513 <br/>
1514 <br/></div>
1515 </div>
1516 </div>
1517 <div class="issue">
1518 <div class="id">StopShip<div class="issueSeparator"></div>
1519 </div>
1520 <div class="metadata">Disabled By: Default<br/>
1521 <div class="explanation">
1522 Using the comment <code>// STOPSHIP</code> can be used to flag code that is incomplete but checked in. This comment marker can be used to indicate that the code should not be shipped until the issue is addressed, and lint will look for these. In Gradle projects, this is only checked for non-debug (release) builds.<br/>
1523 <br/>
1524 In Kotlin, the <code>TODO()</code> method is also treated as a stop ship marker; you can use it to make incomplete code compile, but it will throw an exception at runtime and therefore should be fixed before shipping releases.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1525 <br/>
1526 <br/></div>
1527 </div>
1528 </div>
1529 <div class="issue">
1530 <div class="id">StringFormatTrivial<div class="issueSeparator"></div>
1531 </div>
1532 <div class="metadata">Disabled By: Default<br/>
1533 <div class="explanation">
1534 Every call to <code>String.format</code> creates a new <code>Formatter</code> instance, which will decrease the performance of your app. <code>String.format</code> should only be used when necessary--if the formatted string contains only trivial conversions (e.g. <code>b</code>, <code>s</code>, <code>c</code>) and there are no translation concerns, it will be more efficient to replace them and concatenate with <code>+</code>.<br/><br/>
1535 <br/></div>
1536 </div>
1537 </div>
1538 <div class="issue">
1539 <div class="id">SyntheticAccessor<div class="issueSeparator"></div>
1540 </div>
1541 <div class="metadata">Disabled By: Default<br/>
1542 <div class="explanation">
1543 A private inner class which is accessed from the outer class will force the compiler to insert a synthetic accessor; this means that you are causing extra overhead. This is not important in small projects, but is important for large apps running up against the 64K method handle limit, and especially for <b>libraries</b> where you want to make sure your library is as small as possible for the cases where your library is used in an app running up against the 64K limit.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1544 <br/>
1545 <br/></div>
1546 </div>
1547 </div>
1548 <div class="issue">
1549 <div class="id">TypographyQuotes<div class="issueSeparator"></div>
1550 </div>
1551 <div class="metadata">Disabled By: Default<br/>
1552 <div class="explanation">
1553 Straight single quotes and double quotes, when used as a pair, can be replaced by "curvy quotes" (or directional quotes). Use the right single quotation mark for apostrophes. Never use generic quotes ", ' or free-standing accents `, ´ for quotation marks, apostrophes, or primes. This can make the text more readable.<br/><div class="moreinfo">More info: <a href="https://en.wikipedia.org/wiki/Quotation_mark">https://en.wikipedia.org/wiki/Quotation_mark</a>
1554 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1555 <br/>
1556 <br/></div>
1557 </div>
1558 </div>
1559 <div class="issue">
1560 <div class="id">UnknownNullness<div class="issueSeparator"></div>
1561 </div>
1562 <div class="metadata">Disabled By: Default<br/>
1563 <div class="explanation">
1564 To improve referencing this code from Kotlin, consider adding explicit nullness information here with either <code>@NonNull</code> or <code>@Nullable</code>.<br/><br/>
1565 This check can be configured via the following options:<br/><br/>
1566 <div class="options">
1567 <b>ignore-deprecated</b> (default is false):<br/>
1568 Whether to ignore classes and members that have been annotated with <code>@Deprecated</code>.<br/>
1569 <br/>
1570 Normally this lint check will flag all unannotated elements, but by setting this option to <code>true</code> it will skip any deprecated elements.<br/>
1571 <br/>
1572 To configure this option, use a `lint.xml` file in the project or source folder using an <code>&lt;option&gt;</code> block like the following:
1573 <pre class="errorlines">
1574 <span class="lineno"> 1 </span><span class="tag">&lt;lint></span>
1575 <span class="lineno"> 2 </span> <span class="tag">&lt;issue</span><span class="attribute"> id</span>=<span class="value">"UnknownNullness"</span>>
1576 <span class="caretline"><span class="lineno"> 3 </span> <span class="tag">&lt;option</span><span class="attribute"> name</span>=<span class="warning"><span class="value">"ignore-deprecated"</span> <span class="attribute">value</span>=<span class="value">"false"</span></span> />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
1577 <span class="lineno"> 4 </span> <span class="tag">&lt;/issue></span>
1578 <span class="lineno"> 5 </span><span class="tag">&lt;/lint></span>
1579 </pre>
1580 </div><div class="moreinfo">More info: <a href="https://developer.android.com/kotlin/interop#nullability_annotations">https://developer.android.com/kotlin/interop#nullability_annotations</a>
1581 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1582 <br/>
1583 <br/></div>
1584 </div>
1585 </div>
1586 <div class="issue">
1587 <div class="id">UnsupportedChromeOsHardware<div class="issueSeparator"></div>
1588 </div>
1589 <div class="metadata">Disabled By: Default<br/>
1590 <div class="explanation">
1591 The <code>&lt;uses-feature></code> element should not require this unsupported large screen hardware feature. Any &lt;uses-feature> not explicitly marked with <code>required="false"</code> is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a ChromeOS, large screen, or foldable device are reviewed and marked as not required in the manifest.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/topic/arc/manifest.html#incompat-entries">https://developer.android.com/topic/arc/manifest.html#incompat-entries</a>
1592 </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1593 <br/>
1594 <br/></div>
1595 </div>
1596 </div>
1597 <div class="issue">
1598 <div class="id">UnusedIds<div class="issueSeparator"></div>
1599 </div>
1600 <div class="metadata">Disabled By: Default<br/>
1601 <div class="explanation">
1602 This resource id definition appears not to be needed since it is not referenced from anywhere. Having id definitions, even if unused, is not necessarily a bad idea since they make working on layouts and menus easier, so there is not a strong reason to delete these.<br/>
1603 <br/>
1604 <br/>
1605 The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead.<br/>
1606 <br/>
1607 You can include test sources in the unused resource check by setting the system property <code>lint.unused-resources.include-tests=true</code>, and to exclude them (usually for performance reasons), use <code>lint.unused-resources.exclude-tests=true</code>.<br/>
1608 <br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1609 <br/>
1610 <br/></div>
1611 </div>
1612 </div>
1613 <div class="issue">
1614 <div class="id">ValidActionsXml<div class="issueSeparator"></div>
1615 </div>
1616 <div class="metadata">Disabled By: Default<br/>
1617 <div class="explanation">
1618 Ensures that an actions XML file is properly formed<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
1619 <br/>
1620 <br/></div>
1621 </div>
1622 </div>
1623 <div class="issue">
1624 <div class="id">VulnerableCordovaVersion<div class="issueSeparator"></div>
1625 </div>
1626 <div class="metadata">Disabled By: Default<br/>
1627 <div class="explanation">
1628 The version of Cordova used in the app is vulnerable to security issues. Please update to the latest Apache Cordova version.<br/><div class="moreinfo">More info: <a href="https://cordova.apache.org/announcements/2015/11/20/security.html">https://cordova.apache.org/announcements/2015/11/20/security.html</a>
1629 </div><br/>
1630 <br/></div>
1631 </div>
1632 </div>
1633 <div class="issue">
1634 <div class="id">WrongThread<div class="issueSeparator"></div>
1635 </div>
1636 <div class="metadata">Disabled By: Default<br/>
1637 <div class="explanation">
1638 Ensures that a method which expects to be called on a specific thread, is actually called from that thread. For example, calls on methods in widgets should always be made on the UI thread.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/guide/components/processes-and-threads.html#Threads">https://developer.android.com/guide/components/processes-and-threads.html#Threads</a>
1639 </div><br/>
1640 <br/></div>
1641 </div>
1642 </div>
1643 <div class="issue">
1644 <div class="id">WrongThreadInterprocedural<div class="issueSeparator"></div>
1645 </div>
1646 <div class="metadata">Disabled By: Default<br/>
1647 <div class="explanation">
1648 Searches for interprocedural call paths that violate thread annotations in the program. Tracks the flow of instantiated types and lambda expressions to increase accuracy across method boundaries.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/guide/components/processes-and-threads.html#Threads">https://developer.android.com/guide/components/processes-and-threads.html#Threads</a>
1649 </div><br/>
1650 <br/></div>
1651 </div>
1652 </div>
1653 </div>
1654 </div>
1655 <div class="mdl-card__actions mdl-card--border">
1656 <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="SuppressedIssuesLink" onclick="reveal('SuppressedIssues');">
1657 List Missing Issues</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="MissingIssuesCardLink" onclick="hideid('MissingIssuesCard');">
1658 Dismiss</button> </div>
1659 </div>
1660 </section>
1661 <a name="SuppressInfo"></a>
1662 <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="SuppressCard" style="display: block;">
1663 <div class="mdl-card mdl-cell mdl-cell--12-col">
1664 <div class="mdl-card__title">
1665 <h2 class="mdl-card__title-text">Suppressing Warnings and Errors</h2>
1666 </div>
1667 <div class="mdl-card__supporting-text">
1668 Lint errors can be suppressed in a variety of ways:<br/>
1669 <br/>
1670 1. With a <code>@SuppressLint</code> annotation in the Java code<br/>
1671 2. With a <code>tools:ignore</code> attribute in the XML file<br/>
1672 3. With a //noinspection comment in the source code<br/>
1673 4. With ignore flags specified in the <code>build.gradle</code> file, as explained below<br/>
1674 5. With a <code>lint.xml</code> configuration file in the project<br/>
1675 6. With a <code>lint.xml</code> configuration file passed to lint via the --config flag<br/>
1676 7. With the --ignore flag passed to lint.<br/>
1677 <br/>
1678 To suppress a lint warning with an annotation, add a <code>@SuppressLint("id")</code> annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as <code>"UnusedResources"</code> or <code>{"UnusedResources","UnusedIds"}</code>, or it can be <code>"all"</code> to suppress all lint warnings in the given scope.<br/>
1679 <br/>
1680 To suppress a lint warning with a comment, add a <code>//noinspection id</code> comment on the line before the statement with the error.<br/>
1681 <br/>
1682 To suppress a lint warning in an XML file, add a <code>tools:ignore="id"</code> attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the <code>xmlns:android</code> declaration:<br/>
1683 <code>xmlns:tools="http://schemas.android.com/tools"</code><br/>
1684 <br/>
1685 To suppress a lint warning in a <code>build.gradle</code> file, add a section like this:<br/>
1686
1687 <pre>
1688 android {
1689 lintOptions {
1690 disable 'TypographyFractions','TypographyQuotes'
1691 }
1692 }
1693 </pre>
1694 <br/>
1695 Here we specify a comma separated list of issue id's after the disable command. You can also use <code>warning</code> or <code>error</code> instead of <code>disable</code> to change the severity of issues.<br/>
1696 <br/>
1697 To suppress lint warnings with a configuration XML file, create a file named <code>lint.xml</code> and place it at the root directory of the module in which it applies.<br/>
1698 <br/>
1699 The format of the <code>lint.xml</code> file is something like the following:<br/>
1700
1701 <pre>
1702 &lt;?xml version="1.0" encoding="UTF-8"?>
1703 &lt;lint>
1704 &lt;!-- Ignore everything in the test source set -->
1705 &lt;issue id="all">
1706 &lt;ignore path="\*/test/\*" />
1707 &lt;/issue>
1708
1709 &lt;!-- Disable this given check in this project -->
1710 &lt;issue id="IconMissingDensityFolder" severity="ignore" />
1711
1712 &lt;!-- Ignore the ObsoleteLayoutParam issue in the given files -->
1713 &lt;issue id="ObsoleteLayoutParam">
1714 &lt;ignore path="res/layout/activation.xml" />
1715 &lt;ignore path="res/layout-xlarge/activation.xml" />
1716 &lt;ignore regexp="(foo|bar)\.java" />
1717 &lt;/issue>
1718
1719 &lt;!-- Ignore the UselessLeaf issue in the given file -->
1720 &lt;issue id="UselessLeaf">
1721 &lt;ignore path="res/layout/main.xml" />
1722 &lt;/issue>
1723
1724 &lt;!-- Change the severity of hardcoded strings to "error" -->
1725 &lt;issue id="HardcodedText" severity="error" />
1726 &lt;/lint>
1727 </pre>
1728 <br/>
1729 To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:<br/>
1730 <code>$ lint --ignore UnusedResources,UselessLeaf /my/project/path</code><br/>
1731 <br/>
1732 For more information, see <a href="https://developer.android.com/studio/write/lint.html#config">https://developer.android.com/studio/write/lint.html#config</a><br/>
1733
1734 </div>
1735 </div>
1736 </section> </div>
1737 </main>
1738 </div>
1739 </body>
1740 </html>