Android Studio Compiler Osmand Warning: Geopointparserutil.java uses or overwrites outdated APIs. For more information, recompile with-xlint:deprecation

Source: Internet
Author: User

Background

Before tossing:

"Record" in Android Studio import Osmand and compile

During, a compilation warning was encountered:

12345 :OsmAnd-java:compileJava注: E:\crifan\DevRoot\Osmand-master\OsmAnd-java\src\net\osmand\util\GeoPointParserUtil.java使用或覆盖了已过时的 API。注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。注: 某些输入文件使用了未经检查或不安全的操作。注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

"Resolution Process"

1. I didn't know how to solve it before. Then there was no effect on the compilation, so it was ignored.

2. Later saw:

Android Studio Series Tutorial Four –gradle basics

In the following:

1234 // 移除lint检查的errorlintOptions {  abortOnError false}

Guess is that there is a corresponding here in the Build.gradle, you can add lint parameters, estimate the above said:

12 -Xlint:deprecation-Xlint:unchecked

The parameters, perhaps can be put here.

So try it out.

But in the Osmand-java in the Build.gradle did not see that (Android) lintoptions

So, go to the Internet to search this question.

3. Search:

Android Studio Xlint:deprecation

Reference:

How do I add-xlint:unchecked to my Android Gradle based project? –stack Overflow

To add this configuration:

And then to compile and see.

Sure enough, there was no warning:

Summary

When compiling Java-related code in Android studio, a similar warning appears:

    • For more information, recompile with-xlint:deprecation.
    • For more information, recompile with-xlint:unchecked.

, add the configuration to the Build.gradle of the project:

1234567 allprojects { &NBSP;&NBSP;&NBSP;&NBSP; gradle.projectsevaluated {           tasks.withtype (javacompile) {              Options.compilerargs << "-xlint:unchecked"   << "-xlint:deprecation" &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP; } }

You can eliminate the warning.

Android Studio Compiler Osmand Warning: Geopointparserutil.java uses or overwrites outdated APIs. For more information, recompile with-xlint:deprecation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.