Lint Report: 121 warnings
Issue Types

Overview

Correctness
1warning OldTargetApi: Target SDK attribute is not targeting latest version
1warning FragmentTagUsage: Use FragmentContainerView instead of the <fragment> tag
1warning AndroidGradlePluginVersion: Obsolete Android Gradle Plugin Version
13warning GradleDependency: Obsolete Gradle Dependency
1warning GradleDynamicVersion: Gradle Dynamic Version
4warning NewerVersionAvailable: Newer Library Versions Available
Performance
2warning DisableBaselineAlignment: Missing baselineAligned attribute
5warning Overdraw: Overdraw: Painting regions more than once
17warning UnusedResources: Unused resources
1warning UselessParent: Unnecessary parent layout
Usability:Icons
1warning MonochromeLauncherIcon: Monochrome icon is not defined
2warning IconLocation: Image defined in density-independent drawable folder
Accessibility
2warning ContentDescription: Image without contentDescription
3warning LabelFor: Missing accessibility label
Internationalization
67warning HardcodedText: Hardcoded text
Included Additional Checks (31)
Disabled Checks (41)

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     defaultConfig {
 11         applicationId "com.example.medcuida.pro"
 12         minSdk 24
 13         targetSdk 35                                                                                
 14         versionCode 1
 15         versionName "1.0"
OldTargetApi Correctness Warning Priority 6/10

Use FragmentContainerView instead of the <fragment> tag

../../src/main/res/layout/activity_main.xml:9: Replace the <fragment> tag with FragmentContainerView.
  6     android:layout_height="match_parent"
  7     tools:context=".MainActivity">
  8 
  9     <fragment                                                                                       
 10         android:id="@+id/nav_host_fragment"
 11         android:name="androidx.navigation.fragment.NavHostFragment"
 12         android:layout_width="0dp"
Vendor: Android Open Source Project
Identifier: androidx.fragment
Feedback: https://issuetracker.google.com/issues/new?component=460964
FragmentTagUsage Correctness Warning Priority 5/10

Obsolete Android Gradle Plugin Version

../../../gradle/wrapper/gradle-wrapper.properties:3: A newer version of Gradle than 9.3.1 is available: 9.4.0
 1 distributionBase=GRADLE_USER_HOME
 2 distributionPath=wrapper/dists
 3 distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip                     
 4 networkTimeout=10000
 5 validateDistributionUrl=true
 6 zipStoreBase=GRADLE_USER_HOME
AndroidGradlePluginVersion Correctness Warning Priority 4/10

Obsolete Gradle Dependency

../../build.gradle:8: A newer version of compileSdk than 35 is available: 36
  5 
  6 android {
  7     namespace 'com.example.medcuida.pro'
  8     compileSdk 35                                                                                   
  9 
 10     defaultConfig {
 11         applicationId "com.example.medcuida.pro"
../../build.gradle:39: A newer version of androidx.appcompat:appcompat than 1.6.1 is available: 1.7.1
 36 }
 37 
 38 dependencies {
 39     implementation 'androidx.appcompat:appcompat:1.6.1'                                             
 40     implementation 'com.google.android.material:material:1.11.0'
 41     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 42     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
../../build.gradle:40: A newer version of com.google.android.material:material than 1.11.0 is available: 1.13.0
 37 
 38 dependencies {
 39     implementation 'androidx.appcompat:appcompat:1.6.1'
 40     implementation 'com.google.android.material:material:1.11.0'                                    
 41     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 42     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
 43     implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
../../build.gradle:41: A newer version of androidx.constraintlayout:constraintlayout than 2.1.4 is available: 2.2.1
 38 dependencies {
 39     implementation 'androidx.appcompat:appcompat:1.6.1'
 40     implementation 'com.google.android.material:material:1.11.0'
 41     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'                               
 42     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
 43     implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
 44     implementation 'androidx.navigation:navigation-fragment:2.7.7'
../../build.gradle:42: A newer version of androidx.lifecycle:lifecycle-livedata-ktx than 2.7.0 is available: 2.10.0
 39     implementation 'androidx.appcompat:appcompat:1.6.1'
 40     implementation 'com.google.android.material:material:1.11.0'
 41     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 42     implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'                                
 43     implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
 44     implementation 'androidx.navigation:navigation-fragment:2.7.7'
 45     implementation 'androidx.navigation:navigation-ui:2.7.7'
GradleDependency Correctness Warning Priority 4/10

Gradle Dynamic Version

../../build.gradle:62: Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (com.google.ai.client.generativeai:generativeai:+)
 59     implementation 'com.google.android.gms:play-services-location:21.0.1'
 60 
 61     // Biblioteca oficial do Google AI para Java/Android
 62     implementation 'com.google.ai.client.generativeai:generativeai:+'                               
 63     
 64     // Necessário para lidar com operações assíncronas (Guava)
 65     implementation 'com.google.guava:guava:31.1-android'
GradleDynamicVersion Correctness Warning Priority 4/10

Newer Library Versions Available

../../build.gradle:65: A newer version of com.google.guava:guava than 31.1-android is available: 33.5.0-android
 62     implementation 'com.google.ai.client.generativeai:generativeai:+'
 63     
 64     // Necessário para lidar com operações assíncronas (Guava)
 65     implementation 'com.google.guava:guava:31.1-android'                                            
 66 
 67     // Para chamadas de rede e JSON
 68     implementation 'com.squareup.retrofit2:retrofit:2.9.0'
../../build.gradle:68: A newer version of com.squareup.retrofit2:retrofit than 2.9.0 is available: 3.0.0
 65     implementation 'com.google.guava:guava:31.1-android'
 66 
 67     // Para chamadas de rede e JSON
 68     implementation 'com.squareup.retrofit2:retrofit:2.9.0'                                          
 69     implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
 70     implementation 'com.squareup.okhttp3:okhttp:4.10.0'
../../build.gradle:69: A newer version of com.squareup.retrofit2:converter-gson than 2.9.0 is available: 3.0.0
 66 
 67     // Para chamadas de rede e JSON
 68     implementation 'com.squareup.retrofit2:retrofit:2.9.0'
 69     implementation 'com.squareup.retrofit2:converter-gson:2.9.0'                                    
 70     implementation 'com.squareup.okhttp3:okhttp:4.10.0'
 71 
 72     // Firebase BoM
../../build.gradle:70: A newer version of com.squareup.okhttp3:okhttp than 4.10.0 is available: 5.3.2
 67     // Para chamadas de rede e JSON
 68     implementation 'com.squareup.retrofit2:retrofit:2.9.0'
 69     implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
 70     implementation 'com.squareup.okhttp3:okhttp:4.10.0'                                             
 71 
 72     // Firebase BoM
 73     implementation platform('com.google.firebase:firebase-bom:32.7.2')
NewerVersionAvailable Correctness Warning Priority 4/10

Missing baselineAligned attribute

../../src/main/res/layout/activity_register.xml:59: Set android:baselineAligned="false" on this element for better performance
  56                         android:inputType="textPersonName" />
  57                 </com.google.android.material.textfield.TextInputLayout>
  58 
  59                 <LinearLayout                                                                       
  60                     android:layout_width="match_parent"
  61                     android:layout_height="wrap_content"
  62                     android:orientation="horizontal">
../../src/main/res/layout/activity_register_medico.xml:59: Set android:baselineAligned="false" on this element for better performance
  56                         android:inputType="textPersonName" />
  57                 </com.google.android.material.textfield.TextInputLayout>
  58 
  59                 <LinearLayout                                                                       
  60                     android:layout_width="match_parent"
  61                     android:layout_height="wrap_content"
  62                     android:orientation="horizontal">
DisableBaselineAlignment Performance Warning Priority 3/10

Overdraw: Painting regions more than once

../../src/main/res/layout/activity_forgot_password.xml:8: Possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.Cuida)
  5     android:orientation="vertical"
  6     android:gravity="center"
  7     android:padding="24dp"
  8     android:background="@color/background_color">                                                   
  9 
 10     <ImageView
 11         android:layout_width="187dp"
../../src/main/res/layout/activity_login.xml:7: Possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.Cuida)
   4     android:layout_width="match_parent"
   5     android:layout_height="match_parent"
   6     android:fillViewport="true"
   7     android:background="@color/background_color">                                                   
   8 
   9     <LinearLayout
  10         android:layout_width="match_parent"
../../src/main/res/layout/activity_register.xml:7: Possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.Cuida)
   4     android:layout_width="match_parent"
   5     android:layout_height="match_parent"
   6     android:fillViewport="true"
   7     android:background="@color/background_color">                                                   
   8 
   9     <LinearLayout
  10         android:layout_width="match_parent"
../../src/main/res/layout/activity_register_medico.xml:7: Possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.Cuida)
   4     android:layout_width="match_parent"
   5     android:layout_height="match_parent"
   6     android:fillViewport="true"
   7     android:background="@color/background_color">                                                   
   8 
   9     <LinearLayout
  10         android:layout_width="match_parent"
../../src/main/res/layout/fragment_profile.xml:9: Possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.Cuida)
   6     android:orientation="vertical"
   7     android:padding="24dp"
   8     android:gravity="center_horizontal"
   9     android:background="@color/background_color">                                                   
  10 
  11     <com.google.android.material.imageview.ShapeableImageView
  12         android:id="@+id/profile_image"
Overdraw Performance Warning Priority 3/10

Unused resources

../../src/main/res/layout/activity_forgot_password.xml:2: The resource R.layout.activity_forgot_password appears to be unused
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"                            
  3     android:layout_width="match_parent"
  4     android:layout_height="match_parent"
  5     android:orientation="vertical"
../../src/main/res/layout/activity_register.xml:2: The resource R.layout.activity_register appears to be unused
   1 <?xml version="1.0" encoding="utf-8"?>
   2 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"                              
   3     xmlns:app="http://schemas.android.com/apk/res-auto"
   4     android:layout_width="match_parent"
   5     android:layout_height="match_parent"
../../src/main/res/drawable/btn_outline_error.xml:2: The resource R.drawable.btn_outline_error appears to be unused
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <ripple xmlns:android="http://schemas.android.com/apk/res/android"                                  
  3     android:color="#40B00020">
  4     <item>
  5         <shape android:shape="rectangle">
../../src/main/res/drawable/btn_outline_primary.xml:2: The resource R.drawable.btn_outline_primary appears to be unused
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <ripple xmlns:android="http://schemas.android.com/apk/res/android"                                  
  3     android:color="#400066CC">
  4     <item>
  5         <shape android:shape="rectangle">
../../src/main/res/values/colors.xml:5: The resource R.color.primary_light_color appears to be unused
  2 <resources>
  3     <!-- App Brand Colors -->
  4     <color name="primary_color">#0066CC</color> <!-- Modern Medical Blue -->
  5     <color name="primary_light_color">#E3F2FD</color>                                               
  6     <color name="primary_dark_color">#004C99</color>
  7     <color name="secondary_color">#000000</color> <!-- Black -->
  8     <color name="secondary_dark_color">#000000</color>
UnusedResources Performance Warning Priority 3/10

Unnecessary parent layout

../../src/main/res/layout/fragment_appointments.xml:6: This LinearLayout layout or its FrameLayout parent is unnecessary
  3     android:layout_width="match_parent"
  4     android:layout_height="match_parent">
  5 
  6     <LinearLayout                                                                                   
  7         android:layout_width="match_parent"
  8         android:layout_height="match_parent"
  9         android:orientation="vertical"
UselessParent Performance Warning Priority 2/10

Monochrome icon is not defined

../../src/main/res/drawable-v26/ic_launcher_final.xml:2: The application adaptive icon is missing a monochrome tag
 1 <?xml version="1.0" encoding="utf-8"?>
 2 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">                          
 3     <background android:drawable="@android:color/white" />
 4     <foreground android:drawable="@drawable/ic_logo_scaled" />
 5 </adaptive-icon>
MonochromeLauncherIcon Icons Usability Warning Priority 6/10

Image defined in density-independent drawable folder

../../src/main/res/drawable/.%212449%21ic_logo.png: Found bitmap drawable res/drawable/.!2449!ic_logo.png in densityless folder
../../src/main/res/drawable/ic_logo.png: Found bitmap drawable res/drawable/ic_logo.png in densityless folder
IconLocation Icons Usability Warning Priority 5/10

Image without contentDescription

../../src/main/res/layout/activity_forgot_password.xml:10: Missing contentDescription attribute on image
  7     android:padding="24dp"
  8     android:background="@color/background_color">
  9 
 10     <ImageView                                                                                      
 11         android:layout_width="187dp"
 12         android:layout_height="177dp"
 13         android:layout_marginBottom="24dp"
../../src/main/res/layout/item_medication.xml:20: Missing contentDescription attribute on image
 17         android:padding="16dp"
 18         android:gravity="center_vertical">
 19 
 20         <ImageView                                                                                  
 21             android:layout_width="40dp"
 22             android:layout_height="40dp"
 23             android:src="@android:drawable/ic_menu_agenda"
ContentDescription Accessibility Warning Priority 3/10

Missing accessibility label

../../src/main/res/layout/activity_register.xml:105: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 102                     android:layout_marginBottom="16dp"
 103                     android:hint="Sexo">
 104 
 105                     <AutoCompleteTextView                                                           
 106                         android:id="@+id/gender_auto_complete"
 107                         android:layout_width="match_parent"
 108                         android:layout_height="wrap_content"
../../src/main/res/layout/activity_register_medico.xml:105: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 102                     android:layout_marginBottom="16dp"
 103                     android:hint="Sexo">
 104 
 105                     <AutoCompleteTextView                                                           
 106                         android:id="@+id/gender_auto_complete"
 107                         android:layout_width="match_parent"
 108                         android:layout_height="wrap_content"
../../src/main/res/layout/fragment_schedule_appointment.xml:64: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 61         android:layout_marginBottom="16dp"
 62         android:hint="Escolha o médico">
 63 
 64         <AutoCompleteTextView                                                                       
 65             android:id="@+id/spinner_doctor"
 66             android:layout_width="match_parent"
 67             android:layout_height="wrap_content"
LabelFor Accessibility Warning Priority 2/10

Hardcoded text

../../src/main/res/layout/activity_forgot_password.xml:29: Hardcoded string "Insira o seu email para recuperar a palavra-passe.", should use @string resource
 26     <TextView
 27         android:layout_width="wrap_content"
 28         android:layout_height="wrap_content"
 29         android:text="Insira o seu email para recuperar a palavra-passe."                           
 30         android:gravity="center"
 31         android:textSize="16sp"
 32         android:layout_marginBottom="32dp"/>
../../src/main/res/layout/activity_forgot_password.xml:51: Hardcoded string "Recuperar Palavra-passe", should use @string resource
 48         android:id="@+id/reset_button"
 49         android:layout_width="match_parent"
 50         android:layout_height="56dp"
 51         android:text="Recuperar Palavra-passe"                                                      
 52         android:textSize="16sp"
 53         android:layout_marginBottom="16dp"/>
../../src/main/res/layout/activity_forgot_password.xml:59: Hardcoded string "Voltar ao Login", should use @string resource
 56         android:id="@+id/back_to_login"
 57         android:layout_width="wrap_content"
 58         android:layout_height="wrap_content"
 59         android:text="Voltar ao Login"                                                              
 60         android:textColor="@color/primary_color"
 61         android:textStyle="bold"/>
../../src/main/res/layout/activity_login.xml:78: Hardcoded string "Lembrar-me", should use @string resource
  75                     android:id="@+id/checkbox_remember_me"
  76                     android:layout_width="wrap_content"
  77                     android:layout_height="wrap_content"
  78                     android:text="Lembrar-me"                                                       
  79                     android:layout_gravity="start"
  80                     android:layout_marginBottom="16dp"/>
../../src/main/res/layout/activity_register.xml:92: Hardcoded string "Nº Utente", should use @string resource
  89                             android:id="@+id/utente_edit_text"
  90                             android:layout_width="match_parent"
  91                             android:layout_height="wrap_content"
  92                             android:hint="Nº Utente"                                                
  93                             android:maxLength="9"
  94                             android:inputType="number" />
  95                     </com.google.android.material.textfield.TextInputLayout>
HardcodedText Internationalization Warning Priority 5/10

Included Additional Checks

This card lists all the extra checks run by lint, provided from libraries, build configuration and extra flags. This is included to help you verify whether a particular check is included in analysis when configuring builds. (Note that the list does not include the hundreds of built-in checks into lint, only additional ones.)

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 https://developer.android.com/studio/write/lint.html#config