How to build unsigned flavor for F-Droid with Gradle 5.x

To build the unsigned release APK I used signingConfig null in build.gradle as I am using which is not available on the remote F-Droid build server

productFlavors {
    main {
        signingConfig signingConfigs.release
    fdroid {
        signingConfig null

It worked fine in version 4.x. But starting from version 5.x and above, the following error appeared. Is it possible to somehow resolve this conflict? Or is there another way to build? This solution is pretty old, but now it’s not work.

Caused by: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.lookupMethod(
    at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(
    at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(
    at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(
    at org.gradle.internal.extensibility.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(
    at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(

I’m no dev but I just remove the signingConfig line when it’s needed.

Then it will try to use release config which I overridden (which takes data from

You can use the same config for them and we can remove those lines before build.

1 Like

Fine. Can you please tell me which regex will remove? I’m not very good friends with regex :smiley:

We remove signingConfigs by default.

We can remove all signingConfig with sed -i -e '/signingConfig/d' build.gradle manully.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.