'GeocodingPlugin.java uses or overrides a deprecated API

Note: /Users/jouleslabs/AndroidStudioProjects/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.1/android/src/main/java/com/baseflow/geocoding/GeocodingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.

Configuration geocoding: ^2.0.1

Platform:

🤖 Android



Solution 1:[1]

This library still builds against Android Support libraries and may simply be outdated.
The deprecation is no problem, unless building against API 31, where it finally breaks: https://github.com/Baseflow/flutter-geocoding/issues/87

For more info, enable deprecation warnings in build.gradle:

allprojects {
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:deprecation"
        }
    }
}

Solution 2:[2]

You can ignore this warning, it has nothing to do on your side. It's telling that the geocoding package uses deprecated API.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Yash Garg