MWin123 MWin123 - 5 months ago 71
Android Question

Android Studio - Gradle settings

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

If I hover over "org.gradle.jvmargs=[...]" it says "Unused property". A comment in 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 file in the project. I decided to create a file in USER_HOME/.gradle instead of using command line arguments. It also shows up in Android Studio.


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