Lint Report

Check performed at Wed Apr 22 15:29:46 PDT 2015.
0 errors and 9 warnings found:

Correctness
1Warning OldTargetApi: Target SDK attribute is not targeting latest version
1Warning GradleOverrides: Value overridden by Gradle build script
Security
1Warning AllowBackup: Missing allowBackup attribute
Performance
1Warning Overdraw: Overdraw: Painting regions more than once
1Warning UnusedResources: Unused resources
Usability:Typography
1Warning TypographyEllipsis: Ellipsis string can be replaced with ellipsis character
Usability:Icons
1Warning IconMissingDensityFolder: Missing density folder
Usability
2Warning ButtonStyle: Button should be borderless
Disabled Checks (10)

Correctness
OldTargetApi: Target SDK attribute is not targeting latest version
../../build.gradle:13: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
  10 
  11     defaultConfig {
  12         minSdkVersion 11
  13         targetSdkVersion 20
  14     }
  15 
Note: This issue has an associated quickfix operation in Android Studio/IntelliJ Fix
Priority: 6 / 10
Category: Correctness
Severity: Warning
Explanation: Target SDK attribute is not targeting latest version.
When your application runs on a version of Android that is more recent than your targetSdkVersion specifies that it has been tested with, various compatibility modes kick in. This ensures that your application continues to work, but it may look out of place. For example, if the targetSdkVersion is less than 14, your app may get an option button in the UI.

To fix this issue, set the targetSdkVersion to the highest available value. Then test your app to make sure everything works correctly. You may want to consult the compatibility notes to see what changes apply to each version you are adding support for: http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

More info: http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

To suppress this error, use the issue id "OldTargetApi" as explained in the Suppressing Warnings and Errors section.
GradleOverrides: Value overridden by Gradle build script
../../AndroidManifest.xml:6: This minSdkVersion value (11) is not used; it is always overridden by the value specified in the Gradle build script (11)
   3           package="com.facebook.samples.AdUnitsSample"
   4           android:versionCode="1"
   5           android:versionName="1.0">
   6     <uses-sdk android:minSdkVersion="11"/>
   7     <uses-permission android:name="android.permission.INTERNET"/>
   8     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Priority: 4 / 10
Category: Correctness
Severity: Warning
Explanation: Value overridden by Gradle build script.
The value of (for example) minSdkVersion is only used if it is not specified in the build.gradle build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity.

More info:

To suppress this error, use the issue id "GradleOverrides" as explained in the Suppressing Warnings and Errors section.
Security
AllowBackup: Missing allowBackup attribute
../../AndroidManifest.xml:9: Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data)
   6     <uses-sdk android:minSdkVersion="11"/>
   7     <uses-permission android:name="android.permission.INTERNET"/>
   8     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   9     <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
  10         <activity android:name="com.facebook.samples.AdUnitsSample.AdUnitsSampleActivity"
  11                   android:label="@string/app_name">
Note: This issue has an associated quickfix operation in Eclipse/ADT & Android Studio/IntelliJ Fix
Priority: 3 / 10
Category: Security
Severity: Warning
Explanation: Missing allowBackup attribute.
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.

This may have security consequences for an application. adb backup allows users who have enabled USB debugging to copy application data off of the device. Once backed up, all application data can be read by the user. adb restore allows creation of application data from a source specified by the user. Following a restore, applications should not assume that the data, file 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 backup, and explicitly set android:allowBackup=(true|false)"

More info: http://developer.android.com/reference/android/R.attr.html#allowBackup

To suppress this error, use the issue id "AllowBackup" as explained in the Suppressing Warnings and Errors section.
Performance
Overdraw: Overdraw: Painting regions more than once
../../res/layout/activity_ad_sample.xml:21: Possible overdraw: Root element paints background #E4E5E8 with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)
  18 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  19     android:layout_width="match_parent"
  20     android:layout_height="match_parent"
  21     android:background="#E4E5E8">
  22     <android.support.v4.view.ViewPager
  23         android:id="@+id/viewPager"
Priority: 3 / 10
Category: Performance
Severity: Warning
Explanation: Overdraw: Painting regions more than once.
If you set a background drawable on a root view, then you should use a custom theme where the theme background is null. Otherwise, the theme background will be painted first, only to have your custom background completely cover it; this is called "overdraw".

NOTE: This detector relies on figuring out which layouts are associated with which activities based on scanning the Java code, and it's currently doing that using an inexact pattern matching algorithm. Therefore, it can incorrectly conclude which activity the layout is associated with and then wrongly complain that a background-theme is hidden.

If you want your custom background on multiple pages, then you should consider making a custom theme with your custom background and just using that theme instead of a root element background.

Of course it's possible that your custom drawable is translucent and you want it to be mixed with the background. However, you will get better performance if you pre-mix the background with your drawable and use that resulting image or color as a custom theme background instead.

More info:

To suppress this error, use the issue id "Overdraw" as explained in the Suppressing Warnings and Errors section.
UnusedResources: Unused resources
../../res/values/layouts.xml:2: The resource R.layout.main appears to be unused
   1 <resources>
   2     <item name="main" type="layout">@layout/activity_ad_sample</item>
   3     <bool name="is_tablet">false</bool>
   4 </resources>


Priority: 3 / 10
Category: Performance
Severity: Warning
Explanation: Unused resources.
Unused resources make applications larger and slow down builds.

More info:

To suppress this error, use the issue id "UnusedResources" as explained in the Suppressing Warnings and Errors section.
Usability:Typography
TypographyEllipsis: Ellipsis string can be replaced with ellipsis character
../../res/values/strings.xml:20: Replace "..." with ellipsis character (…, &#8230;) ?
  17 
  18 <resources>
  19     <string name="app_name">Ad Units Sample</string>
  20     <string name="loading_status">Requesting an ad...</string>
  21     <string name="load_interstitial">Load Interstitial</string>
  22     <string name="show_interstitial">Show!</string>
Note: This issue has an associated quickfix operation in Eclipse/ADT & Android Studio/IntelliJ Fix
Priority: 5 / 10
Category: Usability:Typography
Severity: Warning
Explanation: Ellipsis string can be replaced with ellipsis character.
You can replace the string "..." with a dedicated ellipsis character, ellipsis character (…, &#8230;). This can help make the text more readable.

More info: http://en.wikipedia.org/wiki/Ellipsis

To suppress this error, use the issue id "TypographyEllipsis" as explained in the Suppressing Warnings and Errors section.
Usability:Icons
IconMissingDensityFolder: Missing density folder
../../res: Missing density variation folders in res: drawable-xxxhdpi
Priority: 3 / 10
Category: Usability:Icons
Severity: Warning
Explanation: Missing density folder.
Icons will look best if a custom version is provided for each of the major screen density classes (low, medium, high, extra-high, extra-extra-high). This lint check identifies folders which are missing, such as drawable-hdpi.
Low density is not really used much anymore, so this check ignores the ldpi density. To force lint to include it, set the environment variable ANDROID_LINT_INCLUDE_LDPI=true. For more information on current density usage, see http://developer.android.com/resources/dashboard/screens.html

More info: http://developer.android.com/guide/practices/screens_support.html

To suppress this error, use the issue id "IconMissingDensityFolder" as explained in the Suppressing Warnings and Errors section.
Usability
ButtonStyle: Button should be borderless
../../res/layout/fragment_interstitial.xml:27: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
  24             android:gravity="center"
  25             android:layout_marginTop="50dp">
  26 
  27         <Button
  28                 android:id="@+id/loadInterstitialButton"
  29                 android:layout_width="wrap_content"
../../res/layout/fragment_interstitial.xml:35: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
  32                 android:textSize="15sp"
  33                 />
  34 
  35         <Button
  36                 android:id="@+id/showInterstitialButton"
  37                 android:layout_width="wrap_content"
Priority: 5 / 10
Category: Usability
Severity: Warning
Explanation: Button should be borderless.
Button bars typically use a borderless style for the buttons. Set the style="?android:attr/buttonBarButtonStyle" attribute on each of the buttons, and set style="?android:attr/buttonBarStyle" on the parent layout

More info: http://developer.android.com/design/building-blocks/buttons.html

To suppress this error, use the issue id "ButtonStyle" as explained in the Suppressing Warnings and Errors section.
Disabled Checks
The following issues were not run by lint, either because the check is not enabled by default, or because it was disabled with a command line flag or via one or more lint.xml configuration files in the project directories.

BackButton
Disabled By: Default
Priority: 6 / 10
Category: Usability
Severity: Warning
Explanation: Back button.
According to the Android Design Guide,

"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."
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.

More info: http://developer.android.com/design/patterns/pure-android.html

To suppress this error, use the issue id "BackButton" as explained in the Suppressing Warnings and Errors section.
EasterEgg
Disabled By: Default
Priority: 6 / 10
Category: Security
Severity: Warning
Explanation: Code contains easter egg.
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.

More info:

To suppress this error, use the issue id "EasterEgg" as explained in the Suppressing Warnings and Errors section.
FieldGetter
Disabled By: Default
Priority: 4 / 10
Category: Performance
Severity: Warning
Explanation: Using getter instead of field.
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.

NOTE: 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.

More info: http://developer.android.com/guide/practices/design/performance.html#internal_get_set

To suppress this error, use the issue id "FieldGetter" as explained in the Suppressing Warnings and Errors section.
IconExpectedSize
Disabled By: Default
Priority: 5 / 10
Category: Usability:Icons
Severity: Warning
Explanation: Icon has incorrect size.
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.

More info: http://developer.android.com/design/style/iconography.html

To suppress this error, use the issue id "IconExpectedSize" as explained in the Suppressing Warnings and Errors section.
NegativeMargin
Disabled By: Default
Priority: 4 / 10
Category: Usability
Severity: Warning
Explanation: Negative Margins.
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.

More info:

To suppress this error, use the issue id "NegativeMargin" as explained in the Suppressing Warnings and Errors section.
NewerVersionAvailable
Note: This issue has an associated quickfix operation in Android Studio/IntelliJ Fix
Disabled By: Default
Priority: 4 / 10
Category: Correctness
Severity: Warning
Explanation: Newer Library Versions Available.
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 GradleDependency 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 much slower.

More info:

To suppress this error, use the issue id "NewerVersionAvailable" as explained in the Suppressing Warnings and Errors section.
SelectableText
Note: This issue has an associated quickfix operation in Android Studio/IntelliJ Fix
Disabled By: Default
Priority: 7 / 10
Category: Usability
Severity: Warning
Explanation: Dynamic text should probably be selectable.
If a <TextView> is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the <TextView> should specify android:textIsSelectable="true".

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 minSdkVersion.

More info:

To suppress this error, use the issue id "SelectableText" as explained in the Suppressing Warnings and Errors section.
StopShip
Note: This issue has an associated quickfix operation in Android Studio/IntelliJ Fix
Disabled By: Default
Priority: 10 / 10
Category: Correctness
Severity: Warning
Explanation: Code contains STOPSHIP marker.
Using the comment // STOPSHIP 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.

More info:

To suppress this error, use the issue id "StopShip" as explained in the Suppressing Warnings and Errors section.
TypographyQuotes
Note: This issue has an associated quickfix operation in Eclipse/ADT & Android Studio/IntelliJ Fix
Disabled By: Default
Priority: 5 / 10
Category: Usability:Typography
Severity: Warning
Explanation: Straight quotes can be replaced with curvy quotes.
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.

Note that you should never use grave accents and apostrophes to quote, `like this'.

(Also note that you should not use curvy quotes for code fragments.)

More info: http://en.wikipedia.org/wiki/Quotation_mark

To suppress this error, use the issue id "TypographyQuotes" as explained in the Suppressing Warnings and Errors section.
UnusedIds
Disabled By: Default
Priority: 1 / 10
Category: Performance
Severity: Warning
Explanation: Unused id.
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.

More info:

To suppress this error, use the issue id "UnusedIds" as explained in the Suppressing Warnings and Errors section.
Suppressing Warnings and Errors
Lint errors can be suppressed in a variety of ways:

1. With a @SuppressLint annotation in the Java code
2. With a tools:ignore attribute in the XML file
3. With a lint.xml configuration file in the project
4. With a lint.xml configuration file passed to lint via the --config flag
5. With the --ignore flag passed to lint.

To suppress a lint warning with an annotation, add a @SuppressLint("id") 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 "UnusedResources" or {"UnusedResources","UnusedIds"}, or it can be "all" to suppress all lint warnings in the given scope.

To suppress a lint warning in an XML file, add a tools:ignore="id" 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 xmlns:android declaration:
* xmlns:tools="http://schemas.android.com/tools"

To suppress lint warnings with a configuration XML file, create a file named lint.xml and place it at the root directory of the project in which it applies. (If you use the Eclipse plugin's Lint view, you can suppress errors there via the toolbar and Eclipse will create the lint.xml file for you.).

The format of the lint.xml file is something like the following:

<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Disable this given check in this project -->
<issue id="IconMissingDensityFolder" severity="ignore" />

<!-- Ignore the ObsoleteLayoutParam issue in the given files -->
<issue id="ObsoleteLayoutParam">
<ignore path="res/layout/activation.xml" />
<ignore path="res/layout-xlarge/activation.xml" />
</issue>

<!-- Ignore the UselessLeaf issue in the given file -->
<issue id="UselessLeaf">
<ignore path="res/layout/main.xml" />
</issue>

<!-- Change the severity of hardcoded strings to "error" -->
<issue id="HardcodedText" severity="error" />
</lint>

To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
"lint --ignore UnusedResources,UselessLeaf /my/project/path"