Discussion:
How to recompile with -Xlint:deprecated
Andreas Falkenhahn
2018-04-09 13:20:32 UTC
Permalink
I don't use Android Studio but I build everything from the command line using build.gradle. I generate a Lint report like this:

./gradlew lint

This correctly generates a Lint report but it also says this:

Note: MyActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

This makes me wonder how I can do that? I've tried the following:

./gradlew lint -Xlint:deprecation

But it doesn't work. It says:

Problem configuring task :app:lint from command line.
Unknown command-line option '-X'.

So how can I pass -Xlint:deprecation to Lint via gradle?
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1204432129.20180409152032%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-04-09 20:32:31 UTC
Permalink
Please check this answer <https://stackoverflow.com/a/22183825/192373> on
SO. TL;NR: set relevant *options.compilerFlags* in your *build.gradle*.

Cheers,
Alex
Post by Andreas Falkenhahn
I don't use Android Studio but I build everything from the command line
./gradlew lint
Note: MyActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
./gradlew lint -Xlint:deprecation
Problem configuring task :app:lint from command line.
Unknown command-line option '-X'.
So how can I pass -Xlint:deprecation to Lint via gradle?
--
Best regards,
<javascript:>
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/9d6117b1-0032-4d06-a446-70ec251a6469%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andreas Falkenhahn
2018-04-12 17:58:24 UTC
Permalink
Thanks!
Please check this answer on SO. TL;NR: set relevant
options.compilerFlagsin your build.gradle.
Cheers,
Alex
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1205301757.20180412195824%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
Loading...