lint-results.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Lint Report</title>
  6. <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  7. <link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.blue-indigo.min.css" />
  8. <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
  9. <script defer src="https://code.getmdl.io/1.2.0/material.min.js"></script>
  10. <style>
  11. section.section--center {
  12. max-width: 860px;
  13. }
  14. .mdl-card__supporting-text + .mdl-card__actions {
  15. border-top: 1px solid rgba(0, 0, 0, 0.12);
  16. }
  17. main > .mdl-layout__tab-panel {
  18. padding: 8px;
  19. padding-top: 48px;
  20. }
  21. .mdl-card__actions {
  22. margin: 0;
  23. padding: 4px 40px;
  24. color: inherit;
  25. }
  26. .mdl-card > * {
  27. height: auto;
  28. }
  29. .mdl-card__actions a {
  30. color: #00BCD4;
  31. margin: 0;
  32. }
  33. .error-icon {
  34. color: #bb7777;
  35. vertical-align: bottom;
  36. }
  37. .warning-icon {
  38. vertical-align: bottom;
  39. }
  40. .mdl-layout__content section:not(:last-of-type) {
  41. position: relative;
  42. margin-bottom: 48px;
  43. }
  44. .mdl-card .mdl-card__supporting-text {
  45. margin: 40px;
  46. -webkit-flex-grow: 1;
  47. -ms-flex-positive: 1;
  48. flex-grow: 1;
  49. padding: 0;
  50. color: inherit;
  51. width: calc(100% - 80px);
  52. }
  53. div.mdl-layout__drawer-button .material-icons {
  54. line-height: 48px;
  55. }
  56. .mdl-card .mdl-card__supporting-text {
  57. margin-top: 0px;
  58. }
  59. .chips {
  60. float: right;
  61. vertical-align: middle;
  62. }
  63. pre.errorlines {
  64. background-color: white;
  65. font-family: monospace;
  66. border: 1px solid #e0e0e0;
  67. line-height: 0.9rem;
  68. font-size: 0.9rem; padding: 1px 0px 1px; 1px;
  69. overflow: scroll;
  70. }
  71. .prefix {
  72. color: #660e7a;
  73. font-weight: bold;
  74. }
  75. .attribute {
  76. color: #0000ff;
  77. font-weight: bold;
  78. }
  79. .value {
  80. color: #008000;
  81. font-weight: bold;
  82. }
  83. .tag {
  84. color: #000080;
  85. font-weight: bold;
  86. }
  87. .comment {
  88. color: #808080;
  89. font-style: italic;
  90. }
  91. .javadoc {
  92. color: #808080;
  93. font-style: italic;
  94. }
  95. .annotation {
  96. color: #808000;
  97. }
  98. .string {
  99. color: #008000;
  100. font-weight: bold;
  101. }
  102. .number {
  103. color: #0000ff;
  104. }
  105. .keyword {
  106. color: #000080;
  107. font-weight: bold;
  108. }
  109. .caretline {
  110. background-color: #fffae3;
  111. }
  112. .lineno {
  113. color: #999999;
  114. background-color: #f0f0f0;
  115. }
  116. .error {
  117. display: inline-block;
  118. position:relative;
  119. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AwCFR4T/3uLMgAAADxJREFUCNdNyLERQEAABMCjL4lQwIzcjErpguAL+C9AvgKJDbeD/PRpLdm35Hm+MU+cB+tCKaJW4L4YBy+CAiLJrFs9mgAAAABJRU5ErkJggg==) bottom repeat-x;
  120. }
  121. .warning {
  122. text-decoration: none;
  123. background-color: #f6ebbc;
  124. }
  125. .overview {
  126. padding: 10pt;
  127. width: 100%;
  128. overflow: auto;
  129. border-collapse:collapse;
  130. }
  131. .overview tr {
  132. border-bottom: solid 1px #eeeeee;
  133. }
  134. .categoryColumn a {
  135. text-decoration: none;
  136. color: inherit;
  137. }
  138. .countColumn {
  139. text-align: right;
  140. padding-right: 20px;
  141. width: 50px;
  142. }
  143. .issueColumn {
  144. padding-left: 16px;
  145. }
  146. .categoryColumn {
  147. position: relative;
  148. left: -50px;
  149. padding-top: 20px;
  150. padding-bottom: 5px;
  151. }
  152. </style>
  153. <script language="javascript" type="text/javascript">
  154. <!--
  155. function reveal(id) {
  156. if (document.getElementById) {
  157. document.getElementById(id).style.display = 'block';
  158. document.getElementById(id+'Link').style.display = 'none';
  159. }
  160. }
  161. function hideid(id) {
  162. if (document.getElementById) {
  163. document.getElementById(id).style.display = 'none';
  164. }
  165. }
  166. //-->
  167. </script>
  168. </head>
  169. <body class="mdl-color--grey-100 mdl-color-text--grey-700 mdl-base">
  170. <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
  171. <header class="mdl-layout__header">
  172. <div class="mdl-layout__header-row">
  173. <span class="mdl-layout-title">Lint Report: 1 warning</span>
  174. <div class="mdl-layout-spacer"></div>
  175. <nav class="mdl-navigation mdl-layout--large-screen-only">
  176. Check performed at Tue Apr 27 16:56:52 CST 2021 </nav>
  177. </div>
  178. </header>
  179. <div class="mdl-layout__drawer">
  180. <span class="mdl-layout-title">Issue Types</span>
  181. <nav class="mdl-navigation">
  182. <a class="mdl-navigation__link" href="#overview"><i class="material-icons">dashboard</i>Overview</a>
  183. <a class="mdl-navigation__link" href="#DrawAllocation"><i class="material-icons warning-icon">warning</i>Memory allocations within drawing code (1)</a>
  184. </nav>
  185. </div>
  186. <main class="mdl-layout__content">
  187. <div class="mdl-layout__tab-panel is-active">
  188. <a name="overview"></a>
  189. <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="OverviewCard" style="display: block;">
  190. <div class="mdl-card mdl-cell mdl-cell--12-col">
  191. <div class="mdl-card__title">
  192. <h2 class="mdl-card__title-text">Overview</h2>
  193. </div>
  194. <div class="mdl-card__supporting-text">
  195. <table class="overview">
  196. <tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Performance">Performance</a>
  197. </td></tr>
  198. <tr>
  199. <td class="countColumn">1</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
  200. <a href="#DrawAllocation">DrawAllocation</a>: Memory allocations within drawing code</td></tr>
  201. <tr><td></td><td class="categoryColumn"><a href="#MissingIssues">Disabled Checks (29)</a>
  202. </td></tr></table>
  203. <br/> </div>
  204. <div class="mdl-card__actions mdl-card--border">
  205. <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="OverviewCardLink" onclick="hideid('OverviewCard');">
  206. Dismiss</button> </div>
  207. </div>
  208. </section>
  209. <a name="Performance"></a>
  210. <a name="DrawAllocation"></a>
  211. <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="DrawAllocationCard" style="display: block;">
  212. <div class="mdl-card mdl-cell mdl-cell--12-col">
  213. <div class="mdl-card__title">
  214. <h2 class="mdl-card__title-text">Memory allocations within drawing code</h2>
  215. </div>
  216. <div class="mdl-card__supporting-text">
  217. <div class="issue">
  218. <div class="warningslist">
  219. <span class="location"><a href="../../src/main/java/com/sybotan/android/graphy/items/SGraphyClockItem.kt">../../src/main/java/com/sybotan/android/graphy/items/SGraphyClockItem.kt</a>:106</span>: <span class="message">Avoid object allocations during draw/layout operations (preallocate and reuse instead)</span><br /><pre class="errorlines">
  220. <span class="lineno"> 103 </span> }
  221. <span class="lineno"> 104 </span>
  222. <span class="lineno"> 105 </span>
  223. <span class="caretline"><span class="lineno"> 106 </span> calendar.time = <span class="warning">Date()</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;</span>
  224. <span class="lineno"> 107 </span> <span class="keyword">val</span> hour = calendar.get(Calendar.HOUR)
  225. <span class="lineno"> 108 </span> <span class="keyword">val</span> minute = calendar.get(Calendar.MINUTE)
  226. <span class="lineno"> 109 </span> <span class="keyword">var</span> second = calendar.get(Calendar.SECOND).toFloat()
  227. </pre>
  228. </div>
  229. <div class="metadata"><div class="explanation" id="explanationDrawAllocation" style="display: none;">
  230. You should avoid allocating objects during a drawing or layout operation. These are called frequently, so a smooth UI can be interrupted by garbage collection pauses caused by the object allocations.<br/>
  231. <br/>
  232. The way this is generally handled is to allocate the needed objects up front and to reuse them for each drawing operation.<br/>
  233. <br/>
  234. Some methods allocate memory on your behalf (such as <code>Bitmap.create</code>), and these should be handled in the same way.<br/>To suppress this error, use the issue id "DrawAllocation" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  235. <br/></div>
  236. </div>
  237. </div>
  238. <div class="chips">
  239. <span class="mdl-chip">
  240. <span class="mdl-chip__text">DrawAllocation</span>
  241. </span>
  242. <span class="mdl-chip">
  243. <span class="mdl-chip__text">Performance</span>
  244. </span>
  245. <span class="mdl-chip">
  246. <span class="mdl-chip__text">Warning</span>
  247. </span>
  248. <span class="mdl-chip">
  249. <span class="mdl-chip__text">Priority 9/10</span>
  250. </span>
  251. </div>
  252. </div>
  253. <div class="mdl-card__actions mdl-card--border">
  254. <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationDrawAllocationLink" onclick="reveal('explanationDrawAllocation');">
  255. Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="DrawAllocationCardLink" onclick="hideid('DrawAllocationCard');">
  256. Dismiss</button> </div>
  257. </div>
  258. </section>
  259. <a name="MissingIssues"></a>
  260. <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MissingIssuesCard" style="display: block;">
  261. <div class="mdl-card mdl-cell mdl-cell--12-col">
  262. <div class="mdl-card__title">
  263. <h2 class="mdl-card__title-text">Disabled Checks</h2>
  264. </div>
  265. <div class="mdl-card__supporting-text">
  266. One or more issues were not run by lint, either
  267. because the check is not enabled by default, or because
  268. it was disabled with a command line flag or via one or
  269. more <code>lint.xml</code> configuration files in the project directories.
  270. <div id="SuppressedIssues" style="display: none;"><br/><br/><div class="issue">
  271. <div class="id">AppLinksAutoVerifyError<div class="issueSeparator"></div>
  272. </div>
  273. <div class="metadata">Disabled By: Default<br/>
  274. <div class="explanation">
  275. 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>
  276. </div>To suppress this error, use the issue id "AppLinksAutoVerifyError" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  277. <br/></div>
  278. </div>
  279. </div>
  280. <div class="issue">
  281. <div class="id">AppLinksAutoVerifyWarning<div class="issueSeparator"></div>
  282. </div>
  283. <div class="metadata">Disabled By: Default<br/>
  284. <div class="explanation">
  285. 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>
  286. </div>To suppress this error, use the issue id "AppLinksAutoVerifyWarning" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  287. <br/></div>
  288. </div>
  289. </div>
  290. <div class="issue">
  291. <div class="id">BackButton<div class="issueSeparator"></div>
  292. </div>
  293. <div class="metadata">Disabled By: Default<br/>
  294. <div class="explanation">
  295. According to the Android Design Guide,<br/>
  296. <br/>
  297. "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/>
  298. 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="http://developer.android.com/design/patterns/pure-android.html">http://developer.android.com/design/patterns/pure-android.html</a>
  299. </div>To suppress this error, use the issue id "BackButton" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  300. <br/></div>
  301. </div>
  302. </div>
  303. <div class="issue">
  304. <div class="id">ConvertToWebp<div class="issueSeparator"></div>
  305. </div>
  306. <div class="metadata">Disabled By: Default<br/>
  307. <div class="explanation">
  308. 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/>
  309. <br/>
  310. Launcher icons must be in the PNG format.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  311. To suppress this error, use the issue id "ConvertToWebp" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  312. <br/></div>
  313. </div>
  314. </div>
  315. <div class="issue">
  316. <div class="id">EasterEgg<div class="issueSeparator"></div>
  317. </div>
  318. <div class="metadata">Disabled By: Default<br/>
  319. <div class="explanation">
  320. 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/>To suppress this error, use the issue id "EasterEgg" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  321. <br/></div>
  322. </div>
  323. </div>
  324. <div class="issue">
  325. <div class="id">FieldGetter<div class="issueSeparator"></div>
  326. </div>
  327. <div class="metadata">Disabled By: Default<br/>
  328. <div class="explanation">
  329. Accessing a field within the class that defines a getter for that field is at least 3 times faster than calling the getter. For simple getters that do nothing other than return the field, you might want to just reference the local field directly instead.<br/>
  330. <br/>
  331. <b>NOTE</b>: As of Android 2.3 (Gingerbread), this optimization is performed automatically by Dalvik, so there is no need to change your code; this is only relevant if you are targeting older versions of Android.<br/><div class="moreinfo">More info: <a href="http://developer.android.com/guide/practices/design/performance.html#internal_get_set">http://developer.android.com/guide/practices/design/performance.html#internal_get_set</a>
  332. </div>To suppress this error, use the issue id "FieldGetter" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  333. <br/></div>
  334. </div>
  335. </div>
  336. <div class="issue">
  337. <div class="id">GoogleAppIndexingApiWarning<div class="issueSeparator"></div>
  338. </div>
  339. <div class="metadata">Disabled By: Default<br/>
  340. <div class="explanation">
  341. Adds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search.<br/><div class="moreinfo">More info: <a href="https://g.co/AppIndexing/AndroidStudio">https://g.co/AppIndexing/AndroidStudio</a>
  342. </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  343. To suppress this error, use the issue id "GoogleAppIndexingApiWarning" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  344. <br/></div>
  345. </div>
  346. </div>
  347. <div class="issue">
  348. <div class="id">IconExpectedSize<div class="issueSeparator"></div>
  349. </div>
  350. <div class="metadata">Disabled By: Default<br/>
  351. <div class="explanation">
  352. 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="http://developer.android.com/design/style/iconography.html">http://developer.android.com/design/style/iconography.html</a>
  353. </div>To suppress this error, use the issue id "IconExpectedSize" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  354. <br/></div>
  355. </div>
  356. </div>
  357. <div class="issue">
  358. <div class="id">KotlinPropertyAccess<div class="issueSeparator"></div>
  359. </div>
  360. <div class="metadata">Disabled By: Default<br/>
  361. <div class="explanation">
  362. For a method to be represented as a property in Kotlin, strict &#8220;bean&#8221;-style prefixing must be used.<br/>
  363. <br/>
  364. Accessor methods require a &#8216;get&#8217; prefix or for boolean-returning methods an &#8216;is&#8217; 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>
  365. </div>To suppress this error, use the issue id "KotlinPropertyAccess" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  366. <br/></div>
  367. </div>
  368. </div>
  369. <div class="issue">
  370. <div class="id">LambdaLast<div class="issueSeparator"></div>
  371. </div>
  372. <div class="metadata">Disabled By: Default<br/>
  373. <div class="explanation">
  374. To improve calling this code from Kotlin,<br/>
  375. 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>
  376. </div>To suppress this error, use the issue id "LambdaLast" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  377. <br/></div>
  378. </div>
  379. </div>
  380. <div class="issue">
  381. <div class="id">LogConditional<div class="issueSeparator"></div>
  382. </div>
  383. <div class="metadata">Disabled By: Default<br/>
  384. <div class="explanation">
  385. The BuildConfig class (available in Tools 17) provides a constant, "DEBUG", 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 "if (false)" check, surrounding your logging calls with a check for BuildConfig.DEBUG is a good idea.<br/>
  386. <br/>
  387. If you <b>really</b> intend for the logging to be present in release mode, you can suppress this warning with a @SuppressLint annotation for the intentional logging calls.<br/>To suppress this error, use the issue id "LogConditional" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  388. <br/></div>
  389. </div>
  390. </div>
  391. <div class="issue">
  392. <div class="id">MangledCRLF<div class="issueSeparator"></div>
  393. </div>
  394. <div class="metadata">Disabled By: Default<br/>
  395. <div class="explanation">
  396. On Windows, line endings are typically recorded as carriage return plus newline: \r\n.<br/>
  397. <br/>
  398. 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>
  399. </div>To suppress this error, use the issue id "MangledCRLF" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  400. <br/></div>
  401. </div>
  402. </div>
  403. <div class="issue">
  404. <div class="id">MinSdkTooLow<div class="issueSeparator"></div>
  405. </div>
  406. <div class="metadata">Disabled By: Default<br/>
  407. <div class="explanation">
  408. 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>
  409. To suppress this error, use the issue id "MinSdkTooLow" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  410. <br/></div>
  411. </div>
  412. </div>
  413. <div class="issue">
  414. <div class="id">MissingRegistered<div class="issueSeparator"></div>
  415. </div>
  416. <div class="metadata">Disabled By: Default<br/>
  417. <div class="explanation">
  418. If a class is referenced in the manifest or in a layout file, it must also exist in the project (or in one of the libraries included by the project. This check helps uncover typos in registration names, or attempts to rename or move classes without updating the manifest file properly.<br/><div class="moreinfo">More info: <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">http://developer.android.com/guide/topics/manifest/manifest-intro.html</a>
  419. </div>To suppress this error, use the issue id "MissingRegistered" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  420. <br/></div>
  421. </div>
  422. </div>
  423. <div class="issue">
  424. <div class="id">NegativeMargin<div class="issueSeparator"></div>
  425. </div>
  426. <div class="metadata">Disabled By: Default<br/>
  427. <div class="explanation">
  428. 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/>To suppress this error, use the issue id "NegativeMargin" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  429. <br/></div>
  430. </div>
  431. </div>
  432. <div class="issue">
  433. <div class="id">NewerVersionAvailable<div class="issueSeparator"></div>
  434. </div>
  435. <div class="metadata">Disabled By: Default<br/>
  436. <div class="explanation">
  437. This detector checks with a central repository to see if there are newer versions available for the dependencies used by this project. This is similar to the <code>GradleDependency</code> check, which checks for newer versions available in the Android SDK tools and libraries, but this works with any MavenCentral dependency, and connects to the library every time, which makes it more flexible but also <b>much</b> slower.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  438. To suppress this error, use the issue id "NewerVersionAvailable" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  439. <br/></div>
  440. </div>
  441. </div>
  442. <div class="issue">
  443. <div class="id">NoHardKeywords<div class="issueSeparator"></div>
  444. </div>
  445. <div class="metadata">Disabled By: Default<br/>
  446. <div class="explanation">
  447. Do not use Kotlin&#8217;s hard keywords as the name of methods or fields.<br/>
  448. These require the use of backticks to escape when calling from Kotlin.<br/>
  449. Soft keywords, modifier keywords, and special identifiers are allowed.<br/>
  450. <br/>
  451. For example, Mockito&#8217;s <code>when</code> function requires backticks when used from Kotlin:<br/>
  452. <br/>
  453. val callable = Mockito.mock(Callable::class.java)<br/>
  454. Mockito.`when`(callable.call()).thenReturn(/* &#8230; */)<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>
  455. </div>To suppress this error, use the issue id "NoHardKeywords" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  456. <br/></div>
  457. </div>
  458. </div>
  459. <div class="issue">
  460. <div class="id">PermissionImpliesUnsupportedChromeOsHardware<div class="issueSeparator"></div>
  461. </div>
  462. <div class="metadata">Disabled By: Default<br/>
  463. <div class="explanation">
  464. The <code>&lt;uses-permission></code> element should not require a permission that implies an unsupported Chrome OS hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding uses-feature element with <code>required="false"</code> attribute.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/topic/arc/manifest.html#implied-features">https://developer.android.com/topic/arc/manifest.html#implied-features</a>
  465. </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  466. To suppress this error, use the issue id "PermissionImpliesUnsupportedChromeOsHardware" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  467. <br/></div>
  468. </div>
  469. </div>
  470. <div class="issue">
  471. <div class="id">Registered<div class="issueSeparator"></div>
  472. </div>
  473. <div class="metadata">Disabled By: Default<br/>
  474. <div class="explanation">
  475. 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/>
  476. <br/>
  477. 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="http://developer.android.com/guide/topics/manifest/manifest-intro.html">http://developer.android.com/guide/topics/manifest/manifest-intro.html</a>
  478. </div>To suppress this error, use the issue id "Registered" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  479. <br/></div>
  480. </div>
  481. </div>
  482. <div class="issue">
  483. <div class="id">RequiredSize<div class="issueSeparator"></div>
  484. </div>
  485. <div class="metadata">Disabled By: Default<br/>
  486. <div class="explanation">
  487. 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/>
  488. <br/>
  489. 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/>To suppress this error, use the issue id "RequiredSize" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  490. <br/></div>
  491. </div>
  492. </div>
  493. <div class="issue">
  494. <div class="id">SelectableText<div class="issueSeparator"></div>
  495. </div>
  496. <div class="metadata">Disabled By: Default<br/>
  497. <div class="explanation">
  498. 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/>
  499. <br/>
  500. This lint check looks for TextViews which are likely to be displaying data: views whose text is set dynamically. This value will be ignored on platforms older than API 11, so it is okay to set it regardless of your <code>minSdkVersion</code>.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  501. To suppress this error, use the issue id "SelectableText" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  502. <br/></div>
  503. </div>
  504. </div>
  505. <div class="issue">
  506. <div class="id">StopShip<div class="issueSeparator"></div>
  507. </div>
  508. <div class="metadata">Disabled By: Default<br/>
  509. <div class="explanation">
  510. 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/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  511. To suppress this error, use the issue id "StopShip" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  512. <br/></div>
  513. </div>
  514. </div>
  515. <div class="issue">
  516. <div class="id">SyntheticAccessor<div class="issueSeparator"></div>
  517. </div>
  518. <div class="metadata">Disabled By: Default<br/>
  519. <div class="explanation">
  520. 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/>To suppress this error, use the issue id "SyntheticAccessor" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  521. <br/></div>
  522. </div>
  523. </div>
  524. <div class="issue">
  525. <div class="id">TypographyQuotes<div class="issueSeparator"></div>
  526. </div>
  527. <div class="metadata">Disabled By: Default<br/>
  528. <div class="explanation">
  529. Straight single quotes and double quotes, when used as a pair, can be replaced by "curvy quotes" (or directional quotes). This can make the text more readable.<br/>
  530. <br/>
  531. Note that you should never use grave accents and apostrophes to quote, `like this'.<br/>
  532. <br/>
  533. (Also note that you should not use curvy quotes for code fragments.)<br/><div class="moreinfo">More info: <a href="http://en.wikipedia.org/wiki/Quotation_mark">http://en.wikipedia.org/wiki/Quotation_mark</a>
  534. </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  535. To suppress this error, use the issue id "TypographyQuotes" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  536. <br/></div>
  537. </div>
  538. </div>
  539. <div class="issue">
  540. <div class="id">UnknownNullness<div class="issueSeparator"></div>
  541. </div>
  542. <div class="metadata">Disabled By: Default<br/>
  543. <div class="explanation">
  544. To improve referencing this code from Kotlin, consider adding<br/>
  545. explicit nullness information here with either <code>@NonNull</code> or <code>@Nullable</code>.<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#nullability-annotations">https://android.github.io/kotlin-guides/interop.html#nullability-annotations</a>
  546. </div>To suppress this error, use the issue id "UnknownNullness" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  547. <br/></div>
  548. </div>
  549. </div>
  550. <div class="issue">
  551. <div class="id">UnpackedNativeCode<div class="issueSeparator"></div>
  552. </div>
  553. <div class="metadata">Disabled By: Default<br/>
  554. <div class="explanation">
  555. This app loads native libraries using <code>System.loadLibrary()</code>.<br/>
  556. <br/>
  557. Consider adding <code>android:extractNativeLibs="false"</code> to the <code>&lt;application></code> tag in AndroidManifest.xml. Starting with Android 6.0, this will make installation faster, the app will take up less space on the device and updates will have smaller download sizes.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  558. To suppress this error, use the issue id "UnpackedNativeCode" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  559. <br/></div>
  560. </div>
  561. </div>
  562. <div class="issue">
  563. <div class="id">UnsupportedChromeOsHardware<div class="issueSeparator"></div>
  564. </div>
  565. <div class="metadata">Disabled By: Default<br/>
  566. <div class="explanation">
  567. The <code>&lt;uses-feature></code> element should not require this unsupported Chrome OS hardware feature. Any 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 Chrome OS 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>
  568. </div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  569. To suppress this error, use the issue id "UnsupportedChromeOsHardware" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  570. <br/></div>
  571. </div>
  572. </div>
  573. <div class="issue">
  574. <div class="id">UnusedIds<div class="issueSeparator"></div>
  575. </div>
  576. <div class="metadata">Disabled By: Default<br/>
  577. <div class="explanation">
  578. 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/>
  579. <br/>
  580. 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/>
  581. <br/>
  582. You can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests=true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests=true.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
  583. To suppress this error, use the issue id "UnusedIds" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  584. <br/></div>
  585. </div>
  586. </div>
  587. <div class="issue">
  588. <div class="id">WrongThreadInterprocedural<div class="issueSeparator"></div>
  589. </div>
  590. <div class="metadata">Disabled By: Default<br/>
  591. <div class="explanation">
  592. 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>
  593. </div>To suppress this error, use the issue id "WrongThreadInterprocedural" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
  594. <br/></div>
  595. </div>
  596. </div>
  597. </div> </div>
  598. <div class="mdl-card__actions mdl-card--border">
  599. <button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="SuppressedIssuesLink" onclick="reveal('SuppressedIssues');">
  600. List Missing Issues</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="MissingIssuesCardLink" onclick="hideid('MissingIssuesCard');">
  601. Dismiss</button> </div>
  602. </div>
  603. </section>
  604. <a name="SuppressInfo"></a>
  605. <section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="SuppressCard" style="display: block;">
  606. <div class="mdl-card mdl-cell mdl-cell--12-col">
  607. <div class="mdl-card__title">
  608. <h2 class="mdl-card__title-text">Suppressing Warnings and Errors</h2>
  609. </div>
  610. <div class="mdl-card__supporting-text">
  611. Lint errors can be suppressed in a variety of ways:<br/>
  612. <br/>
  613. 1. With a <code>@SuppressLint</code> annotation in the Java code<br/>
  614. 2. With a <code>tools:ignore</code> attribute in the XML file<br/>
  615. 3. With a //noinspection comment in the source code<br/>
  616. 4. With ignore flags specified in the <code>build.gradle</code> file, as explained below<br/>
  617. 5. With a <code>lint.xml</code> configuration file in the project<br/>
  618. 6. With a <code>lint.xml</code> configuration file passed to lint via the --config flag<br/>
  619. 7. With the --ignore flag passed to lint.<br/>
  620. <br/>
  621. 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/>
  622. <br/>
  623. 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/>
  624. <br/>
  625. 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/>
  626. <code>xmlns:tools="http://schemas.android.com/tools"</code><br/>
  627. <br/>
  628. To suppress a lint warning in a <code>build.gradle</code> file, add a section like this:<br/>
  629. <br/>
  630. android {<br/>
  631. &nbsp;&nbsp;&nbsp;&nbsp;lintOptions {<br/>
  632. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disable 'TypographyFractions','TypographyQuotes'<br/>
  633. &nbsp;&nbsp;&nbsp;&nbsp;}<br/>
  634. }<br/>
  635. <br/>
  636. 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/>
  637. <br/>
  638. 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/>
  639. <br/>
  640. The format of the <code>lint.xml</code> file is something like the following:<br/>
  641. <br/>
  642. &lt;?xml version="1.0" encoding="UTF-8"?><br/>
  643. &lt;lint><br/>
  644. &nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Ignore everything in the test source set --><br/>
  645. &nbsp;&nbsp;&nbsp;&nbsp;&lt;issue id="all"><br/>
  646. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ignore path="*/test/*" /><br/>
  647. &nbsp;&nbsp;&nbsp;&nbsp;&lt;/issue><br/>
  648. <br/>
  649. &nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Disable this given check in this project --><br/>
  650. &nbsp;&nbsp;&nbsp;&nbsp;&lt;issue id="IconMissingDensityFolder" severity="ignore" /><br/>
  651. <br/>
  652. &nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Ignore the ObsoleteLayoutParam issue in the given files --><br/>
  653. &nbsp;&nbsp;&nbsp;&nbsp;&lt;issue id="ObsoleteLayoutParam"><br/>
  654. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ignore path="res/layout/activation.xml" /><br/>
  655. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ignore path="res/layout-xlarge/activation.xml" /><br/>
  656. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ignore regexp="(foo|bar).java" /><br/>
  657. &nbsp;&nbsp;&nbsp;&nbsp;&lt;/issue><br/>
  658. <br/>
  659. &nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Ignore the UselessLeaf issue in the given file --><br/>
  660. &nbsp;&nbsp;&nbsp;&nbsp;&lt;issue id="UselessLeaf"><br/>
  661. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ignore path="res/layout/main.xml" /><br/>
  662. &nbsp;&nbsp;&nbsp;&nbsp;&lt;/issue><br/>
  663. <br/>
  664. &nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Change the severity of hardcoded strings to "error" --><br/>
  665. &nbsp;&nbsp;&nbsp;&nbsp;&lt;issue id="HardcodedText" severity="error" /><br/>
  666. &lt;/lint><br/>
  667. <br/>
  668. 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/>
  669. <code>$ lint --ignore UnusedResources,UselessLeaf /my/project/path</code><br/>
  670. <br/>
  671. For more information, see <a href="http://g.co/androidstudio/suppressing-lint-warnings">http://g.co/androidstudio/suppressing-lint-warnings</a><br/>
  672. </div>
  673. </div>
  674. </section> </div>
  675. </main>
  676. </div>
  677. </body>
  678. </html>