Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown command-line option '--recompile-scripts'. After updating gradle to 5.1.1

With the update of Android Studio to 3.4 gradle was updated to 5.1.1. With this new version I tried to profile the build speed (https://developer.android.com/studio/build/optimize-your-build#profile) by executing the following command: gradlew --profile --recompile-scripts --offline --rerun-tasks assemble<Flavor><Buildtype>. Sadly the option '--recompile-scripts' is not known anymore. Is there any replacement for this option?

like image 928
user1185087 Avatar asked Sep 08 '25 14:09

user1185087


2 Answers

It has been removed by the Gradle team :https://github.com/gradle/gradle/issues/1425 Try cleanBuildCache before build

like image 195
Mathias Seguy Android2ee Avatar answered Sep 10 '25 05:09

Mathias Seguy Android2ee


Downgrading the build.gradle from classpath 'com.android.tools.build:gradle:3.4.0' to classpath 'com.android.tools.build:gradle:3.2.1'(or any other version) may help you

like image 27
Amin Pinjari Avatar answered Sep 10 '25 04:09

Amin Pinjari