Home » Android » gradle – Crashlytics could not parse the Android Project structure

gradle – Crashlytics could not parse the Android Project structure

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have connected my Android app to crashlytics. My project has 3 flavors. The fabric key I’ve added to the main AndroidManifest.xml which is common for all 3 flavors. But when I’m trying to build apk file it return error:

:app:fabricGenerateResourcesKzDebug
ERROR - Crashlytics Developer Tools error.
java.lang.IllegalArgumentException: Crashlytics could not parse the Android Project structure. 

The gradle of my project for flavors is next:

    flavorDimensions("build")

    productFlavors {
        kz {
            dimension "build"
        }
        ua {
            dimension "build"
        }
        uz {
            dimension "build"
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }

The whole error of my build:

Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
Could not find google-services.json while looking in [src/ua/debug, src/debug/ua, src/ua, src/debug, src/uaDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
Could not find google-services.json while looking in [src/ua/release, src/release/ua, src/ua, src/release, src/uaRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Crashlytics couldn't find the res folder specified in sourceSets.main.res, please make one. It picked: src\main\res
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:apiservice:preBuild UP-TO-DATE
:apiservice:preDebugBuild UP-TO-DATE
:apiservice:compileDebugAidl UP-TO-DATE
:apiservice:compileDebugRenderscript UP-TO-DATE
:apiservice:checkDebugManifest UP-TO-DATE
:apiservice:generateDebugBuildConfig UP-TO-DATE
:apiservice:generateDebugResValues UP-TO-DATE
:apiservice:generateDebugResources UP-TO-DATE
:apiservice:packageDebugResources UP-TO-DATE
:apiservice:platformAttrExtractor UP-TO-DATE
:apiservice:processDebugManifest UP-TO-DATE
:apiservice:generateDebugRFile
:apiservice:prepareLintJar UP-TO-DATE
:apiservice:generateDebugSources
:apiservice:javaPreCompileDebug UP-TO-DATE
:apiservice:compileDebugJavaWithJavac
:apiservice:extractDebugAnnotations
:apiservice:mergeDebugConsumerProguardFiles
:apiservice:mergeDebugShaders UP-TO-DATE
:apiservice:compileDebugShaders UP-TO-DATE
:apiservice:generateDebugAssets UP-TO-DATE
:apiservice:packageDebugAssets UP-TO-DATE
:apiservice:packageDebugRenderscript NO-SOURCE
:apiservice:processDebugJavaRes NO-SOURCE
:apiservice:transformResourcesWithMergeJavaResForDebug
:apiservice:transformClassesAndResourcesWithSyncLibJarsForDebug
:apiservice:compileDebugNdk NO-SOURCE
:apiservice:mergeDebugJniLibFolders
:apiservice:transformNativeLibsWithMergeJniLibsForDebug
:apiservice:transformNativeLibsWithSyncJniLibsForDebug
:apiservice:bundleDebug
:apiservice:compileDebugSources
:apiservice:assembleDebug
:apiservice:preReleaseBuild UP-TO-DATE
:apiservice:compileReleaseAidl
:apiservice:compileReleaseRenderscript
:apiservice:checkReleaseManifest
:apiservice:generateReleaseBuildConfig
:apiservice:generateReleaseResValues
:apiservice:generateReleaseResources
:apiservice:packageReleaseResources
:apiservice:processReleaseManifest
:apiservice:generateReleaseRFile
:apiservice:generateReleaseSources
:apiservice:javaPreCompileRelease
:apiservice:compileReleaseJavaWithJavac
:apiservice:extractReleaseAnnotations
:apiservice:mergeReleaseConsumerProguardFiles
:apiservice:mergeReleaseShaders
:apiservice:compileReleaseShaders
:apiservice:generateReleaseAssets
:apiservice:packageReleaseAssets
:apiservice:packageReleaseRenderscript NO-SOURCE
:apiservice:processReleaseJavaRes NO-SOURCE
:apiservice:transformResourcesWithMergeJavaResForRelease
:apiservice:transformClassesAndResourcesWithSyncLibJarsForRelease
:apiservice:compileReleaseNdk NO-SOURCE
:apiservice:mergeReleaseJniLibFolders
:apiservice:transformNativeLibsWithMergeJniLibsForRelease
:apiservice:transformNativeLibsWithSyncJniLibsForRelease
:apiservice:bundleRelease
:apiservice:compileReleaseSources
:apiservice:mergeReleaseResources
:apiservice:verifyReleaseResources
:apiservice:assembleRelease
:apiservice:assemble
:apiservice:lint
Ran lint on variant debug: 4 issues found
Ran lint on variant release: 4 issues found
Wrote HTML report to file:///E:/Jenkins/vbi-build/workspace/apiservice/build/reports/lint-results.html
Wrote XML report to file:///E:/Jenkins/vbi-build/workspace/apiservice/build/reports/lint-results.xml
:apiservice:preDebugUnitTestBuild UP-TO-DATE
:apiservice:javaPreCompileDebugUnitTest
:apiservice:compileDebugUnitTestJavaWithJavac
:apiservice:mockableAndroidJar
:apiservice:processDebugUnitTestJavaRes NO-SOURCE
:apiservice:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:apiservice:testDebugUnitTest
:apiservice:preReleaseUnitTestBuild UP-TO-DATE
:apiservice:javaPreCompileReleaseUnitTest
:apiservice:compileReleaseUnitTestJavaWithJavac
:apiservice:processReleaseUnitTestJavaRes NO-SOURCE
:apiservice:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:apiservice:testReleaseUnitTest
:apiservice:test
:apiservice:check
:apiservice:build
:app:preBuild UP-TO-DATE
:app:preKzDebugBuild UP-TO-DATE
:app:compileKzDebugAidl UP-TO-DATE
:app:compileKzDebugRenderscript UP-TO-DATE
:app:checkKzDebugManifest UP-TO-DATE
:app:generateKzDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceKzDebug UP-TO-DATE
:app:mergeKzDebugShaders UP-TO-DATE
:app:compileKzDebugShaders UP-TO-DATE
:app:generateKzDebugAssets UP-TO-DATE
:app:mergeKzDebugAssets UP-TO-DATE
:app:processKzDebugGoogleServices
Parsing json file: E:\Jenkins\vbi-build\workspace\app\src\kz\google-services.json
:app:createKzDebugCompatibleScreenManifests UP-TO-DATE
:app:processKzDebugManifest UP-TO-DATE
:app:fabricGenerateResourcesKzDebug
ERROR - Crashlytics Developer Tools error.
java.lang.IllegalArgumentException: Crashlytics could not parse the Android Project structure. 
Contact [email protected] for assistance.
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:489)
at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
at com.crashlytics.tools.android.DeveloperTools.gradleMain(DeveloperTools.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:359)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.this$2$callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4.doCall(FabricTaskBuilder.groovy:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:718)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:691)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Invalid resource path: E:\Jenkins\vbi-build\workspace\app\src\main\res
at com.crashlytics.tools.android.project.StandardAndroidProject.getValuesDirectory(StandardAndroidProject.java:55)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.createTypedProject(StandardAndroidProjectFactory.java:201)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:150)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:125)
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:484)
... 79 more
:app:fabricGenerateResourcesKzDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:fabricGenerateResourcesKzDebug'.
> Crashlytics Developer Tools error.
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:fabricGenerateResourcesKzDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: Crashlytics Developer Tools error.
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:375)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.this$2$callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4.doCall(FabricTaskBuilder.groovy:132)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:718)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:691)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 29 more
Caused by: com.crashlytics.tools.android.exception.PluginException: Crashlytics Developer Tools error.
at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:356)
at com.crashlytics.tools.android.DeveloperTools.gradleMain(DeveloperTools.java:292)
at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:359)
... 40 more
Caused by: java.lang.IllegalArgumentException: Crashlytics could not parse the Android Project structure. 
Contact [email protected] for assistance.
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:489)
at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
... 42 more
Caused by: java.lang.IllegalArgumentException: Invalid resource path: E:\Jenkins\vbi-build\workspace\app\src\main\res
at com.crashlytics.tools.android.project.StandardAndroidProject.getValuesDirectory(StandardAndroidProject.java:55)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.createTypedProject(StandardAndroidProjectFactory.java:201)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:150)
at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:125)
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:484)
... 43 more
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 49s
70 actionable tasks: 45 executed, 25 up-to-date
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE

I’m novice in working with flavors so maybe the problem is here (actually I don’t know). However, I am stuck.

My project structure:

enter image description here

How to&Answers:

I’ve had the same error after restructuring the resources of my flavors.

You have to make sure that every flavor has a res folder inside it. Even if the flavor has no own resources. After adding some empty folders the build did succeed again.

Example:

/App /src /flavor1 /res <-- /flavor1Release /res <-- /flavor2 /res <-- /main /res <-- 

Answer:

The solution for me was this:

  1. To hard code the fabric key in the AndroidManifest.xml rather than
    referencing it as a string in the strings.xml file.
  2. To add an empty “res” folder inside my “main” folder.