Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Gradle settings

I'm new to Android Studio and I built a project from Github with an included gradle.properties file.

If I hover over "org.gradle.jvmargs=[...]" it says "Unused property". A comment in gradle.properties says

IDE (e.g. Android Studio) users: Gradle settings configured through the IDE will override any settings specified in this file.

How can I configure Gradle in Android Studio?

I found older guides where you could add command line arguments under setting. But this option is missing. (Android Studio 2.1.2)

Settings - Gradle Edit: "Unused property" is probably a bug. I'm pretty sure it's using the gradle.properties file in the project. I decided to create a gradle.properties file in USER_HOME/.gradle instead of using command line arguments. It also shows up in Android Studio.

like image 535
MWin123 Avatar asked Oct 31 '25 13:10

MWin123


2 Answers

In the Settings dialog, look instead under Build, Execution, Deployment > Compiler - there's a Command-line options box there - I think that is where you override settings now. It's empty by default though so unless you've set something there, it wouldn't be overriding other settings. It's a per-project setting - you can also change your defaults for all projects by editing user settings files - described here http://tools.android.com/tech-docs/configuration.

like image 84
SGill Avatar answered Nov 03 '25 03:11

SGill


You can search in the preferences window for "Command-line" (Note: this is IntelliJ IDEA, but should be similar in Android Studio)

Gradle CMD

like image 31
OneCricketeer Avatar answered Nov 03 '25 05:11

OneCricketeer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!