代码提示级别设置 inspection
生活随笔
收集整理的這篇文章主要介紹了
代码提示级别设置 inspection
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
配置文件
profile [?pro?fa?l] n.側(cè)面; 外形,輪廓; 人物簡介; vt.描…的輪廓; 給…畫側(cè)面圖; inspection [?n?sp?k??n] n.檢驗; 檢查; 視察; 檢閱; x1091profile [?pro?fa?l] n.側(cè)面; 外形,輪廓; 人物簡介; vt.描…的輪廓; 給…畫側(cè)面圖; 2inspection [?n?sp?k??n] n.檢驗; 檢查; 視察; 檢閱; AS相關(guān)的配置文件基本都放在【\Users\Administrator\.AndroidStudio3.0\config】目錄下代碼提示級別相關(guān)的配置文件放在【\config\inspection】目錄下:默認只有一個Default.xml配置文件,里面只配置了一個name:<inspections profile_name="Default" version="1.0"><option name="myName" value="Default" /> </inspections>1<inspections profile_name="Default" version="1.0">2 ?<option name="myName" value="Default" />3</inspections>我新建了一個profile,并更改了一些配置,文件內(nèi)容變?yōu)?#xff1a;<inspections profile_name="bqt" version="1.0"><option name="myName" value="bqt" /><inspection_tool class="AndroidLintAddJavascriptInterface" enabled="true" level="INFO" enabled_by_default="true" /><inspection_tool class="FieldCanBeLocal" enabled="true" level="INFO" enabled_by_default="true" />... </inspections>71<inspections profile_name="bqt" version="1.0">2 ?<option name="myName" value="bqt" />3 ?<inspection_tool class="AndroidLintAddJavascriptInterface" enabled="true" level="INFO" enabled_by_default="true" />4 ?<inspection_tool class="FieldCanBeLocal" enabled="true" level="INFO" enabled_by_default="true" />5 ...6</inspections>里面詳細記錄了你所有的修改點,所以,其實你只需保存這個配置文件即可。一、修改 JAVA 設置
Declaration Redundancy?聲明冗余
Declaration access can be weakerClass structure
field can be local二、修改?Android --> Lint 設置
Internationalization?國際化
Hardcoded硬編碼 text?Overlapping重疊items?in RelativeLayout,比如下圖的TV如果只有toRightOf沒有toLeftOf,就可能出現(xiàn)控件重疊情況:
TextView Internationalization
Bidirectional?Text?雙向文字
Padding and margin symmetry?對稱Right-to-left text compatibility issues?從右到左文字兼容性問題
Using left/right instead of start/end attributes
Using RTL attributes without enabling RTL support?
Accessibility?無障礙
Image without contentDescriptionMissing labelFor attribute
Security 安全
addJavascriptInterface CalledAllowBackup/FullBackupContent Problems?允許備份/完整的備份內(nèi)容The allowBackup attribute determines if an application's data can be backed up and restored. It is documented at http://developer.android.com/reference/android/R.attr.html#allowBackup By default, this flag is set to true. When this flag is set to true, application data can be backed up and restored by the user using adb backup and adb restore.1The allowBackup attribute determines if an application's data can be backed up and restored. It is documented at http://developer.android.com/reference/android/R.attr.html#allowBackup 2By default, this flag is set to true. When this flag is set to true, application data can be backed up and restored by the user using adb backup and adb restore.
Usability?可用性
Missing support for Firebase App IndexingAdds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search. 11Adds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search. Text size is too small
附件列表
?
總結(jié)
以上是生活随笔為你收集整理的代码提示级别设置 inspection的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2017-10-9(Volley使用范例
- 下一篇: 云数据库MongoDB全面支持3.4版本