Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
对于Android,我在哪里可以找到@SuppressLint有效问题ID的完整列表_Android_Lint - Fatal编程技术网

对于Android,我在哪里可以找到@SuppressLint有效问题ID的完整列表

对于Android,我在哪里可以找到@SuppressLint有效问题ID的完整列表,android,lint,Android,Lint,目前,我需要忽略一个与国际化相关的字符串连接警告,但我希望在将来“学习如何钓鱼”其他专门警告 从命令行运行以下命令: lint --list 这假设您的$PATH中有Android SDK。如果没有,您必须导航到Android SDK的tools文件夹,在那里可以找到lint可执行文件。在Android SDK文件夹的tools子文件夹中,运行 lint --list 来源:并使用与android studio 1.5.1捆绑的版本向下滚动至“问题Id” lint--列表 有效发行类别: C

目前,我需要忽略一个与国际化相关的字符串连接警告,但我希望在将来“学习如何钓鱼”其他专门警告

从命令行运行以下命令:

lint --list

这假设您的$PATH中有Android SDK。如果没有,您必须导航到Android SDK的tools文件夹,在那里可以找到lint可执行文件。

在Android SDK文件夹的tools子文件夹中,运行

lint --list

来源:并使用与android studio 1.5.1捆绑的版本向下滚动至“问题Id”

lint--列表

有效发行类别:

Correctness
Correctness:Messages
Security
Performance
Usability:Typography
Usability:Icons
Usability
Accessibility
Internationalization
Bi-directional Text
有效的问题id:

"ContentDescription": Image without contentDescription
"AddJavascriptInterface": addJavascriptInterface Called
"ShortAlarm": Short or Frequent Alarm
"AlwaysShowAction": Usage of showAsAction=always
"ShiftFlags": Dangerous Flag Constant Declaration
"LocalSuppress": @SuppressLint on invalid element
"UniqueConstants": Overlapping Enumeration Constants
"InlinedApi": Using inlined constants on older versions
"Override": Method conflicts with new inherited method
"NewApi": Calling new methods on older versions
"UnusedAttribute": Attribute unused on older versions
"AppCompatMethod": Using Wrong AppCompat Method
"AppCompatResource": Menu namespace
"AppIndexingError": Wrong Usage of App Indexing
"AppIndexingWarning": Missing App Indexing Support
"InconsistentArrays": Inconsistencies in array element counts
"Assert": Assertions
"BackButton": Back button
"ButtonCase": Cancel/OK dialog button capitalization
"ButtonOrder": Button order
"ButtonStyle": Button should be borderless
"ByteOrderMark": Byte order mark inside files
"MissingSuperCall": Missing Super Call
"AdapterViewChildren": AdapterViews cannot have children in XML
"ScrollViewCount": ScrollViews can have only one child
"GetInstance": Cipher.getInstance with ECB
"CommitTransaction": Missing commit() calls
"Recycle": Missing recycle() calls
"ClickableViewAccessibility": Accessibility in Custom Views
"EasterEgg": Code contains easter egg
"StopShip": Code contains STOPSHIP marker
"CustomViewStyleable": Mismatched Styleable/Custom View Name
"CutPasteId": Likely cut & paste mistakes
"SimpleDateFormat": Implied locale in date format
"Deprecated": Using deprecated resources
"MissingPrefix": Missing Android XML namespace
"MangledCRLF": Mangled file line endings
"DuplicateIncludedIds": Duplicate ids across layouts combined with include
      tags
"DuplicateIds": Duplicate ids within a single layout
"DuplicateDefinition": Duplicate definitions of resources
"ReferenceType": Incorrect reference types
"ExtraText": Extraneous text in resource files
"FieldGetter": Using getter instead of field
"FullBackupContent": Valid Full Backup Content File
"ValidFragment": Fragment not instantiatable
"PackageManagerGetSignatures": Potential Multiple Certificate Exploit
"GradleCompatible": Incompatible Gradle Versions
"AndroidGradlePluginVersion": Incompatible Android Gradle Plugin
"GradleDependency": Obsolete Gradle Dependency
"GradleDeprecated": Deprecated Gradle Construct
"GradleGetter": Gradle Implicit Getter Call
"GradleIdeError": Gradle IDE Support Issues
"GradlePath": Gradle Path Issues
"GradleDynamicVersion": Gradle Dynamic Version
"StringShouldBeInt": String should be int
"NewerVersionAvailable": Newer Library Versions Available
"AccidentalOctal": Accidental Octal
"GridLayout": GridLayout validation
"HandlerLeak": Handler reference leaks
"HardcodedDebugMode": Hardcoded value of android:debuggable in the manifest
"HardcodedText": Hardcoded text
"IconDuplicatesConfig": Identical bitmaps across various configurations
"IconDuplicates": Duplicated icons under different names
"GifUsage": Using .gif format for bitmaps is discouraged
"IconColors": Icon colors do not follow the recommended visual style
"IconDensities": Icon densities validation
"IconDipSize": Icon density-independent size validation
"IconExpectedSize": Icon has incorrect size
"IconExtension": Icon format does not match the file extension
"IconLauncherShape": The launcher icon shape should use a distinct silhouette
"IconLocation": Image defined in density-independent drawable folder
"IconMissingDensityFolder": Missing density folder
"IconMixedNinePatch": Clashing PNG and 9-PNG files
"IconNoDpi": Icon appears in both -nodpi and dpi folders
"IconXmlAndPng": Icon is specified both as .xml file and as a bitmap
"IncludeLayoutParam": Ignored layout params on include
"DisableBaselineAlignment": Missing baselineAligned attribute
"InefficientWeight": Inefficient layout weight
"NestedWeights": Nested layout weights
"Orientation": Missing explicit orientation
"Suspicious0dp": Suspicious 0dp dimension
"InvalidPackage": Package not included in Android
"DrawAllocation": Memory allocations within drawing code
"UseSparseArrays": HashMap can be replaced with SparseArray
"UseValueOf": Should use valueOf instead of new
"JavascriptInterface": Missing @JavascriptInterface on methods
"LabelFor": Missing labelFor attribute
"InconsistentLayout": Inconsistent Layouts
"InflateParams": Layout Inflation without a Parent
"DefaultLocale": Implied default locale in case conversion
"LocaleFolder": Wrong locale name
"InvalidResourceFolder": Invalid Resource Folder
"WrongRegion": Suspicious Language/Region Combination
"UseAlpha2": Using 3-letter Codes
"LogConditional": Unconditional Logging Calls
"LongLogTag": Too Long Log Tags
"LogTagMismatch": Mismatched Log Tags
"AllowBackup": Missing allowBackup attribute
"MissingApplicationIcon": Missing application icon
"DeviceAdmin": Malformed Device Admin
"DuplicateActivity": Activity registered more than once
"DuplicateUsesFeature": Feature declared more than once
"GradleOverrides": Value overridden by Gradle build script
"IllegalResourceRef": Name and version must be integer or string, not
      resource
"MipmapIcons": Use Mipmap Launcher Icons
"MockLocation": Using mock location provider in production
"MultipleUsesSdk": Multiple <uses-sdk> elements in the manifest
"ManifestOrder": Incorrect order of elements in manifest
"MissingVersion": Missing application name/version
"OldTargetApi": Target SDK attribute is not targeting latest version
"UniquePermission": Permission names are not unique
"UsesMinSdkAttributes": Minimum SDK and target SDK attributes not defined
"WrongManifestParent": Wrong manifest parent
"ManifestTypo": Typos in manifest tags
"FloatMath": Using FloatMath instead of Math
"MergeRootFrame": FrameLayout can be replaced with <merge> tag
"InnerclassSeparator": Inner classes should use $ rather than .
"Instantiatable": Registered class is not instantiatable
"MissingRegistered": Missing registered class
"MissingId": Fragments should specify an id or tag
"LibraryCustomView": Custom views in libraries should use res-auto-namespace
"ResAuto": Hardcoded Package in Namespace
"NamespaceTypo": Misspelled namespace declaration
"UnusedNamespace": Unused namespace
"NegativeMargin": Negative Margins
"NestedScrolling": Nested scrolling widgets
"NfcTechWhitespace": Whitespace in NFC tech lists
"UnlocalizedSms": SMS phone number missing country code
"ObsoleteLayoutParam": Obsolete layout params
"OnClick": onClick method does not exist
"Overdraw": Overdraw: Painting regions more than once
"DalvikOverride": Method considered overridden by Dalvik
"OverrideAbstract": Not overriding abstract methods on older platforms
"ParcelCreator": Missing Parcelable CREATOR field
"UnusedQuantity": Unused quantity translations
"MissingQuantity": Missing quantity translation
"ImpliedQuantity": Implied Quantities
"ExportedPreferenceActivity": PreferenceActivity should not be exported
"PackagedPrivateKey": Packaged private key
"PrivateResource": Using private resources
"ProguardSplit": Proguard.cfg file contains generic Android rules
"Proguard": Using obsolete ProGuard configuration
"PropertyEscape": Incorrect property escapes
"UsingHttp": Using HTTP instead of HTTPS
"SpUsage": Using dp instead of sp for text sizes
"InOrMmUsage": Using mm or in dimensions
"PxUsage": Using 'px' dimension
"SmallSp": Text size is too small
"Registered": Class is not registered in the manifest
"RelativeOverlap": Overlapping items in RelativeLayout
"RequiredSize": Missing layout_width or layout_height attributes
"AaptCrash": Potential AAPT crash
"ResourceCycle": Cycle in resource definitions
"ResourceName": Resource with Wrong Prefix
"RtlCompat": Right-to-left text compatibility issues
"RtlEnabled": Using RTL attributes without enabling RTL support
"RtlSymmetry": Padding and margin symmetry
"RtlHardcoded": Using left/right instead of start/end attributes
"ScrollViewSize": ScrollView size validation
"SdCardPath": Hardcoded reference to /sdcard
"SecureRandom": Using a fixed seed with SecureRandom
"TrulyRandom": Weak RNG
"ExportedContentProvider": Content provider does not require permission
"ExportedReceiver": Receiver does not require permission
"ExportedService": Exported service does not require permission
"GrantAllUris": Content provider shares everything
"WorldReadableFiles": openFileOutput() call passing MODE_WORLD_READABLE
"WorldWriteableFiles": openFileOutput() call passing MODE_WORLD_WRITEABLE
"ServiceCast": Wrong system service casts
"SetJavaScriptEnabled": Using setJavaScriptEnabled
"CommitPrefEdits": Missing commit() on SharedPreference editor
"SignatureOrSystemPermissions": signatureOrSystem permissions declared
"SQLiteString": Using STRING instead of TEXT
"StateListReachable": Unreachable state in a <selector>
"StringFormatCount": Formatting argument types incomplete or inconsistent
"StringFormatMatches": String.format string doesn't match the XML format
      string
"StringFormatInvalid": Invalid format string
"PluralsCandidate": Potential Plurals
"UseCheckPermission": Using the result of check permission calls
"CheckResult": Ignoring results
"ResourceAsColor": Should pass resolved color instead of resource id
"MissingPermission": Missing Permissions
"Range": Outside Range
"ResourceType": Wrong Resource Type
"WrongThread": Wrong Thread
"WrongConstant": Incorrect constant
"ProtectedPermissions": Using system app permission
"TextFields": Missing inputType or hint
"TextViewEdits": TextView should probably be an EditText instead
"SelectableText": Dynamic text should probably be selectable
"MenuTitle": Missing menu title
"ShowToast": Toast created but not shown
"TooDeepLayout": Layout hierarchy is too deep
"TooManyViews": Layout has too many views
"ExtraTranslation": Extra translation
"MissingTranslation": Incomplete translation
"Typos": Spelling error
"TypographyDashes": Hyphen can be replaced with dash
"TypographyEllipsis": Ellipsis string can be replaced with ellipsis character
"TypographyFractions": Fraction string can be replaced with fraction
      character
"TypographyOther": Other typographical problems
"TypographyQuotes": Straight quotes can be replaced with curvy quotes
"UnusedResources": Unused resources
"UnusedIds": Unused id
"UseCompoundDrawables": Node can be replaced by a TextView with compound
      drawables
"UselessLeaf": Useless leaf layout
"UselessParent": Useless parent layout
"EnforceUTF8": Encoding used in resource files is not UTF-8
"ViewConstructor": Missing View constructors for XML inflation
"ViewHolder": View Holder Candidates
"ViewTag": Tagged object leaks
"WrongViewCast": Mismatched view type
"Wakelock": Incorrect WakeLock usage
"WebViewLayout": WebViews in wrap_content parents
"WrongCall": Using wrong draw/layout method
"WrongCase": Wrong case for view tag
"InvalidId": Invalid ID declaration
"NotSibling": RelativeLayout Invalid Constraints
"UnknownId": Reference to an unknown id
"UnknownIdInLayout": Reference to an id that is not in the current layout
"SuspiciousImport": 'import android.R' statement
“ContentDescription”:没有ContentDescription的图像
“AddJavascriptInterface”:调用AddJavascriptInterface
“短警报”:短警报或频繁警报
“AlwaysShowAction”:showaAction=always的用法
“ShiftFlags”:危险标志常量声明
“LocalSuppress”:@SuppressLint位于无效元素上
“唯一常量”:重叠枚举常量
“InlinedApi”:在旧版本上使用内联常量
“重写”:方法与新继承的方法冲突
“NewApi”:在旧版本上调用新方法
“未使用属性”:旧版本上未使用的属性
“AppCompat方法”:使用错误的AppCompat方法
“AppCompatResource”:菜单名称空间
“AppIndexingError”:应用程序索引的错误使用
“AppIndexingWarning”:缺少应用程序索引支持
“不一致”:数组元素计数不一致
“断言”:断言
“后退按钮”:后退按钮
“按钮状态”:取消/确定对话框按钮大小写
“ButtonOrder”:按钮顺序
“按钮样式”:按钮应无边框
“字节顺序标记”:文件内的字节顺序标记
“丢失超级呼叫”:丢失超级呼叫
“AdapterViewChildren”:AdapterViews不能有XML格式的子项
“ScrollViewCount”:ScrollView只能有一个子视图
“GetInstance”:带ECB的Cipher.GetInstance
“CommitTransaction”:缺少commit()调用
“Recycle”:缺少Recycle()调用
“ClickableViewAccessibility”:自定义视图中的辅助功能
“EasterEgg”:代码包含复活节彩蛋
“StopShip”:代码包含StopShip标记
“CustomViewStyleable”:可设置样式/自定义视图名称不匹配
“剪切粘贴ID”:可能的剪切粘贴错误
“SimpleDataFormat”:日期格式的隐含区域设置
“已弃用”:使用弃用的资源
“MissingPrefix”:缺少Android XML命名空间
“MangledCRLF”:文件行结尾被损坏
“DuplicateIncludedID”:与include组合的布局中的重复ID
标签
“DuplicateID”:单个布局中的重复ID
“DuplicateDefinition”:资源的重复定义
“ReferenceType”:引用类型不正确
“ExtraText”:资源文件中的无关文本
“FieldGetter”:使用getter而不是field
“FullBackupContent”:有效的完整备份内容文件
“ValidFragment”:不可实例化的片段
“PackageManagerGetSignatures”:潜在的多证书攻击
“GradleCompatible”:不兼容的Gradle版本
“AndroidGradlePluginVersion”:不兼容的Android Gradle插件
“渐变依赖”:过时的渐变依赖
“GradleDeprecated”:不推荐的Gradle构造
“GradleGetter”:Gradle隐式Getter调用
“GradleIdeError”:GradleIDE支持问题
“梯度路径”:梯度路径问题
“渐变动态版本”:渐变动态版本
“StringShouldBeInt”:字符串应为int
“NewServersOnAvailable”:可用的较新库版本
“意外八进制”:意外八进制
“GridLayout”:GridLayout验证
“HandlerLeak”:处理程序引用泄漏
“HardcodedDebugMode”:清单中android:debugable的硬编码值
“硬编码文本”:硬编码文本
“IconDuplicatesConfig”:不同配置中的相同位图
“IconDuplicates”:不同名称下的重复图标
“gif用法”:不鼓励对位图使用.gif格式
“IConColor”:图标颜色不符合建议的视觉样式
“图标密度”:图标密度验证
“IconDipSize”:图标密度独立的大小验证
“IconExpectedSize”:图标大小不正确
“IconExtension”:图标格式与文件扩展名不匹配
“IconLauncherShape”:启动器图标形状应使用独特的轮廓
“IconLocation”:在与密度无关的可绘制文件夹中定义的图像
“IconMissingDensityFolder”:缺少密度文件夹
“IconMixedNinePatch”:冲突PNG和9-PNG文件
“IconNoDpi”:图标同时出现在-nodpi和dpi文件夹中
“IconXmlAndPng”:图标被指定为.xml文件和位图
“IncludeDelayOutParam”:已忽略include上的布局参数
“DisableBaselineAlignment”:缺少baselineAligned属性
“无效权重”:无效布局权重
“嵌套权重”:嵌套布局权重
“方向”:缺少明确的方向
“可疑0dp”:可疑0dp维度
“InvalidPackage”:Android中不包含该软件包
“DrawAllocation”:图形代码内的内存分配
“UseSparsearray”:HashMap可以替换为Sparsarray
“UseValueOf”:应使用valueOf而不是new
“JavascriptInterface”:方法上缺少@JavascriptInterface
“LabelFor”:缺少LabelFor属性
“布局不一致”:布局不一致
“充气参数”:没有父级的布局充气
“DefaultLocale”:案例转换中隐含的默认语言环境
“LocaleFolder”:区域设置名称错误
“InvalidResourceFolder”:无效的资源文件夹
“错误区域”:可疑语言/区域组合
“使用字母2”:使用3个字母的代码
“LogConditional”:无条件记录调用
“LongLogTag”:日志标记太长
“LogTagMismatch”:不匹配的日志标记
“AllowBackup”:缺少AllowBackup属性
“缺少应用程序”:缺少应用程序图标
“DeviceAdmin”:格式不正确的设备管理员
“重复活动”:多次注册的活动
“DuplicateUsesFeature”:多次声明的功能
“GradleOverrides”:由Gradle生成脚本覆盖的值
“IllegalResourceRef”:名称和版本必须是整数或字符串,而不是
资源
“MipmapIcons”:使用Mipmap启动程序图标
“模拟位置”:使用模拟位置