Lint Report: 3 errors and 14 warnings
Issue Types

Overview

Lint
1warning ObsoleteLintCustomCheck: Obsolete custom lint check
Correctness
3error InvalidPackage: Package not included in Android
1warning OldTargetApi: Target SDK attribute is not targeting latest version
1warning UnusedAttribute: Attribute unused on older versions
Security
1warning ExportedService: Exported service does not require permission
1warning AllowBackup: AllowBackup/FullBackupContent Problems
Performance
3warning StaticFieldLeak: Static Field Leaks
1warning UnusedResources: Unused resources
Usability
1warning GoogleAppIndexingWarning: Missing support for Firebase App Indexing
Internationalization
4warning HardcodedText: Hardcoded text
Disabled Checks (33)

Obsolete custom lint check

../../../../../.gradle/caches/transforms-2/files-2.1/4b7ede2fc6361a8694ee0c62fc6cf3f3/appcompat-1.2.0/jars/lint.jar: Lint found an issue registry (androidx.appcompat.AppCompatIssueRegistry) which requires a newer API level. That means that the custom lint checks are intended for a newer lint version; please upgrade
ObsoleteLintCustomCheck Warning Priority 10/10

Package not included in Android

../../libs/backendless-5.7.2.jar: Invalid package reference in library; not included in Android: javax.jms. Referenced from weborb.messaging.v3.Subscriber.
../../libs/backendless-5.7.2.jar: Invalid package reference in library; not included in Android: javax.servlet.http. Referenced from weborb.messaging.v3.StreamingSubscriber.
../../libs/backendless-5.7.2.jar: Invalid package reference in library; not included in Android: javax.servlet. Referenced from weborb.messaging.v3.StreamingSubscriber.
InvalidPackage Correctness Error Priority 6/10

Target SDK attribute is not targeting latest version

../../build.gradle:10: 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.
  7     defaultConfig {
  8         applicationId "com.example.pnexample"
  9         minSdkVersion 16
 10         targetSdkVersion 29                                                                         
 11         versionCode 1
 12         versionName "1.0"
 13         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
OldTargetApi Correctness Warning Priority 6/10

Attribute unused on older versions

../../src/main/AndroidManifest.xml:13: Attribute usesCleartextTraffic is only used in API level 23 and higher (current min is 16)
 10         android:roundIcon="@mipmap/ic_launcher_round"
 11         android:supportsRtl="true"
 12         android:theme="@style/AppTheme"
 13         android:usesCleartextTraffic="true">                                                        
 14         <activity android:name=".activities.MainActivity">
 15             <intent-filter>
 16                 <action android:name="android.intent.action.MAIN" />
UnusedAttribute Correctness Warning Priority 6/10

Exported service does not require permission

../../src/main/AndroidManifest.xml:24: Exported service does not require permission
 21         <activity android:name=".activities.Messaging_Activity">
 22         </activity>
 23 
 24         <service android:name="com.backendless.push.BackendlessFCMService">                         
 25             <intent-filter>
 26                 <action android:name="com.google.firebase.MESSAGING_EVENT" />
 27             </intent-filter>
ExportedService Security Warning Priority 5/10

AllowBackup/FullBackupContent Problems

../../src/main/AndroidManifest.xml:6: On SDK version 23 and up, your app data will be automatically backed up, and restored on app install. Your GCM regid will not work across restores, so you must ensure that it is excluded from the back-up set. Use the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html
  3     package="com.example.pnexample">
  4     <uses-permission android:name="android.permission.INTERNET" />
  5 
  6     <application                                                                                    
  7         android:allowBackup="true"
  8         android:icon="@mipmap/ic_launcher"
  9         android:label="@string/app_name"
AllowBackup Security Warning Priority 3/10

Static Field Leaks

../../src/main/java/com/example/pnexample/activities/Messaging_Activity.java:20: Do not place Android context classes in static fields; this is a memory leak
 17 
 18 public class Messaging_Activity extends AppCompatActivity {
 19 
 20     private static Button registerButton;                                                           
 21     private static Button unregisterButton;
 22 
 23     @Override
../../src/main/java/com/example/pnexample/activities/Messaging_Activity.java:21: Do not place Android context classes in static fields; this is a memory leak
 18 public class Messaging_Activity extends AppCompatActivity {
 19 
 20     private static Button registerButton;
 21     private static Button unregisterButton;                                                         
 22 
 23     @Override
 24     protected void onCreate(Bundle savedInstanceState) {
../../src/main/java/com/example/pnexample/activities/Push_activity.java:19: Do not place Android context classes in static fields; this is a memory leak
 16 
 17 public class Push_activity extends AppCompatActivity {
 18 
 19     private static Button main_button;                                                              
 20 
 21     @Override
 22     protected void onCreate(Bundle savedInstanceState) {
StaticFieldLeak Performance Warning Priority 6/10

Unused resources

../../src/main/res/values/strings.xml:3: The resource R.string.go_to_menu appears to be unused
 1 <resources>
 2     <string name="app_name">PN Example</string>
 3     <string name="go_to_menu">Go to menu</string>                                                   
 4 </resources>
UnusedResources Performance Warning Priority 3/10

Missing support for Firebase App Indexing

../../src/main/AndroidManifest.xml:6: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details.
  3     package="com.example.pnexample">
  4     <uses-permission android:name="android.permission.INTERNET" />
  5 
  6     <application                                                                                    
  7         android:allowBackup="true"
  8         android:icon="@mipmap/ic_launcher"
  9         android:label="@string/app_name"
GoogleAppIndexingWarning Usability Warning Priority 5/10

Hardcoded text

../../src/main/res/layout/activity_main.xml:26: Hardcoded string "messaging", should use @string resource
 23             android:id="@+id/messaging_button"
 24             android:layout_width="wrap_content"
 25             android:layout_height="wrap_content"
 26             android:text="messaging"                                                                
 27             android:visibility="visible" />
 28     </LinearLayout>
../../src/main/res/layout/messaging_activity.xml:10: Hardcoded string "register", should use @string resource
  7         android:id="@+id/register_button"
  8         android:layout_width="match_parent"
  9         android:layout_height="wrap_content"
 10         android:text="register" />                                                                  
 11 
 12     <Button
 13         android:id="@+id/unregister_button"
../../src/main/res/layout/messaging_activity.xml:16: Hardcoded string "unregister", should use @string resource
 13         android:id="@+id/unregister_button"
 14         android:layout_width="match_parent"
 15         android:layout_height="wrap_content"
 16         android:text="unregister" />                                                                
 17 </LinearLayout>
../../src/main/res/layout/push_activity.xml:14: Hardcoded string "go_to_menu", should use @string resource
 11         android:layout_width="0dp"
 12         android:layout_height="wrap_content"
 13         android:layout_marginBottom="683dp"
 14         android:text="go_to_menu"                                                                   
 15         app:layout_constraintBottom_toBottomOf="parent"
 16         app:layout_constraintEnd_toEndOf="parent"
 17         app:layout_constraintHorizontal_bias="0.5"
HardcodedText Internationalization Warning Priority 5/10

Disabled Checks

One or more 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.

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 //noinspection comment in the source code
4. With ignore flags specified in the build.gradle file, as explained below
5. With a lint.xml configuration file in the project
6. With a lint.xml configuration file passed to lint via the --config flag
7. 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 with a comment, add a //noinspection id comment on the line before the statement with the error.

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 a lint warning in a build.gradle file, add a section like this:

android {
    lintOptions {
        disable 'TypographyFractions','TypographyQuotes'
    }
}

Here we specify a comma separated list of issue id's after the disable command. You can also use warning or error instead of disable to change the severity of issues.

To suppress lint warnings with a configuration XML file, create a file named lint.xml and place it at the root directory of the module in which it applies.

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

<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <!-- Ignore everything in the test source set -->
    <issue id="all">
        <ignore path="*/test/*" />
    </issue>

    <!-- 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" />
        <ignore regexp="(foo|bar).java" />
    </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

For more information, see http://g.co/androidstudio/suppressing-lint-warnings