码迷,mamicode.com
首页 > 移动开发 > 详细

Android工具:Lint的使用

时间:2014-11-06 17:41:46      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   io   ar   使用   for   sp   

1.在cmd中执行:lint  --show  AllowBackup // 显示lint中关于AllowBackup这个话题(issue)的解释,执行结果如下:

AllowBackup
-----------
Summary: Ensure that allowBackup is explicitly set in the application's
manifest

Priority: 3 / 10
Severity: Warning
Category: Security

The allowBackup attribute determines if an application's data can be ba
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 ba
and adb restore.

This may have security consequences for an application. adb backup allo
users who have enabled USB debugging to copy application data off of th
device. Once backed up, all application data can be read by the user. a
restore allows creation of application data from a source specified by
user. Following a restore, applications should not assume that the data
permissions, and directory permissions were created by the application
itself.

Setting allowBackup="false" opts an application out of both backup and
restore.

To fix this warning, decide whether your application should support bac
and explicitly set android:allowBackup=(true|false)"

More information:
http://developer.android.com/reference/android/R.attr.html#allowBackup</span>
2.在cmd中执行:lint  --show // 显示lint中所有话题(issue)的解释;

3.在cmd中执行:lint  --help // 显示lint的使用帮助;


小结:本人在了解android:allowBackup属性含义时,顺带发现了Lint的一些用法。以上为抛砖引玉,发现更多金矿就靠你自己啦!

Android工具:Lint的使用

标签:android   style   blog   http   io   ar   使用   for   sp   

原文地址:http://blog.csdn.net/berber78/article/details/40861631

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!