Android工具:Lint的使用

來源:互聯網
上載者:User

標籤: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'smanifestPriority: 3 / 10Severity: WarningCategory: SecurityThe allowBackup attribute determines if an application's data can be baand restored. It is documented athttp://developer.android.com/reference/android/R.attr.html#allowBackupBy 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 baand adb restore.This may have security consequences for an application. adb backup allousers who have enabled USB debugging to copy application data off of thdevice. Once backed up, all application data can be read by the user. arestore allows creation of application data from a source specified byuser. Following a restore, applications should not assume that the datapermissions, and directory permissions were created by the applicationitself.Setting allowBackup="false" opts an application out of both backup andrestore.To fix this warning, decide whether your application should support bacand 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的使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.