Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add '--warning-mode all' command line argument in Android Studio

I am getting the following message when I compile an Android Studio project:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.

How do I add the '--warning-mode all' command line setting to my Android Studio project so I can find the deprecated feature?

like image 524
Steve A Avatar asked Feb 10 '19 18:02

Steve A


People also ask

How do I build an Android app from the command line?

Build your app from the command line. You can execute all the build tasks available to your Android project using the Gradle wrapper command line tool. It's available as a batch file for Windows (gradlew.bat) and a shell script for Linux and Mac (gradlew.sh), and it's accessible from the root of each project you create with Android Studio.

How to create alert dialog in Android Studio?

Step 1: Create a new project and name it AlertDialogExample. Step 2: Open res -> layout -> activity_main. xml (or) main. xml and add following code: Here we add the button UI on click of which alert dialog will appear. We also used textview for asking user to click on button.

How do I open the warning screen in Android Studio?

[opening warning screen in android studio Click the warning icon as marked in the image. Warning screen will open. ][click to see image] here Share Follow answered Jul 8 2021 at 9:34

How to improve linting performance in Android Studio?

To further improve linting performance, you should also add annotations to your code. Android Studio provides a code scanning tool called lint that can help you to identify and correct problems with the structural quality of your code without your having to execute the app or write test cases.


3 Answers

Just create a file called gradle.properties in your root project:

root 
|--gradle.properties 
|--build.gradle 
|--app 
|----build.gradle

Then add inside that file:

org.gradle.warning.mode=(all,none,summary)

like image 115
Zain Ali Avatar answered Oct 23 '22 14:10

Zain Ali


Please have a look at this older SO question, in particular this answer.

Just pasting the same picture here, but credits should go to original answer author:

Settings\Compiler, Command-line Options

like image 27
superjos Avatar answered Oct 23 '22 14:10

superjos


Add this

org.gradle.warning.mode=all

in Gradle Scripts -> gradle.properties(Project Properties) enter image description here

like image 24
Vidyesh Churi Avatar answered Oct 23 '22 15:10

Vidyesh Churi