Android Studio 4.0.2 Gradle Error: No value has been specified for property 'enableGradleWorkers'
Asked Answered
P

7

6

I am using Android Studio 4.0.2 and I am getting error:

No value has been specified for property 'enableGradleWorkers'.
Panzer answered 9/10, 2020 at 8:38 Comment(1)
Strange - I see the answer in 'Review first posts' - and the question has the tag 'excel-formula', but looking at original question above this tag no longer exists. Not sure where this comment should get posted - this is only feasible place without doing a bunch of searches...Boogiewoogie
L
29

This happens because of crashlytics gradle plugin on version 2.7.1

To fix, simple downgrade to the latest working version:

open your project level build.gradle

 dependencies {
     //your stuff
        //classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' THIS VERSION DOESNT WORK
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.6.1'
    }

UPDATE
As suggested by @صلي علي محمد Atef Farouk, recent versions of firebase-crashlytics-gradle plugin must be applied by last on build.grandle

So in your project level build.gradle you can use any version of but in the module level build.gradle you must ensure that com.google.firebase.crashlytics is the last one to be applied:

plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
}
Lowelllowenstein answered 8/7, 2021 at 1:18 Comment(3)
In my case the error was No value has been specified for property 'googleServicesResourceRoot'. but this solution worked also. OFFTOPIC: if this worked for you upvote the answer, commenting that worked but with no more info is not necessary.Fides
I was challenged by error "A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask'). > No value has been specified for property 'googleServicesResourceRoot'.". This solution worked.Jehol
Are there any updates solution for version 2.7.1 ?Loud
O
10

These are gradle combinations working fine for me .

in project level:

    classpath 'com.android.tools.build:gradle:4.2.2'
    classpath 'com.google.gms:google-services:4.3.8'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' 

so, if like this don't downgrade to any other version.

The trick is in gradle app level:

how? you need to move this line apply plugin: 'com.google.firebase.crashlytics' to be last line in the file. like this:

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
Olympiaolympiad answered 10/8, 2021 at 19:14 Comment(2)
I was getting a different error: No value has been specified for property 'googleServicesResourceRoot' But this solved it. It makes sense that crashlytics comes after, but my understanding is that Gradle looks at all your dependencies and works out the ordering internally. Oh well...Charleencharlemagne
I think this is the best answer. Crashlytics plugin needs something from other plugin, so it must be the lastEncrata
M
0

This worked for me.

There was a log at Build Output. There is an issue under

.gradle\caches\modules-2\files-2.1\folderofdependency'

Delete this cached folder and rebuild again.

Mannose answered 22/11, 2020 at 15:10 Comment(0)
K
0

For problem - A problem was found with the configuration of task ':app:generateSafeArgsDebug' (type 'ArgumentsGenerationTask').

No value has been specified for property 'enableGradleWorkers'.

I solved it by using -

  1. In App's gradle - apply plugin: 'androidx.navigation.safeargs'

  2. In Project's gradle - classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.2.0-rc02'

The problem I had that I was using classpath of android.arch.xxxx

May be helpful to those who encountered this frustrating error like me.

Kaleykaleyard answered 26/12, 2020 at 15:32 Comment(0)
S
0

This is likely due to the ordering of your plugins. See this SO to fix:

Type 'UploadMappingFileTask' property 'googleServicesResourceRoot' doesn't have a configured value

Stratfordonavon answered 4/8, 2021 at 19:8 Comment(0)
S
-1

Add this to your gradle: android.enableGradleWorkers=true

See BooleanOption.kt

Sophistication answered 9/10, 2020 at 8:42 Comment(2)
I added it in gradle.properties but nothing changedPanzer
Seems as though Android Studio 4.2 no longer supports this fix (I think it's a default, so if you have the problem like me, another fix is likely required)Ultravirus
I
-2

The problem originates from Android project itself

So I searched for a lot of solution but nothing works, So the only thing that you can do is:

Start a new Project

  • if the code is available on github them import it and please dont update the plugins

  • And from next time the thing that you can do is after each change in your android project test it if it is working fine, and keep pushing it on github

  • So that if any error appears again you can revert back the changes

If anyone solved this problem without creating a new project please tell

Impeach answered 15/12, 2020 at 9:46 Comment(1)
Surely Starting a New Project is not the only thing you can do...Scrimshaw

© 2022 - 2024 — McMap. All rights reserved.