okbuck icon indicating copy to clipboard operation
okbuck copied to clipboard

You must specify signing config for app release build type

Open Andecy opened this issue 10 years ago • 13 comments

Hello! I am following 手把手OkBuck教程:应用到AndroidTDDBootStrap项目(续) but when executing "./gradlew okbuck" throw this error

==========>> overwrite mode is toggle on <<========== :okbuck FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':okbuck'.

    You must specify signing config for app release build type

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Andecy avatar May 12 '16 01:05 Andecy

Just as the error message said:

You must specify signing config for app release build type

Piasy avatar May 12 '16 02:05 Piasy

thank your response! I can not understand how to specify?what means build type

Andecy avatar May 12 '16 02:05 Andecy

android {
    ...
    signingConfigs {
        release {
            storeFile file('../debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.release
        }
        release {
            signingConfig signingConfigs.release
        }
    }
    ...
}

Piasy avatar May 12 '16 02:05 Piasy

thank you!I config this bug like your code but A new bug throw:

AndroidLibraryRule srcs must be non-null.

Andecy avatar May 12 '16 02:05 Andecy

Do you have a library module that contains no source set?

Piasy avatar May 12 '16 02:05 Piasy

thanks!yep it is,How can I do ?

Andecy avatar May 12 '16 02:05 Andecy

Add a source set for it could fix this.

Piasy avatar May 12 '16 02:05 Piasy

those modules have the kind of catolog:

|-src
  |-main
    |-res

so add a source set is like this?

|-src
  |-main
    |-res
    |-java
      |-com.package

Andecy avatar May 12 '16 02:05 Andecy

yes, actually, only java is needed

Piasy avatar May 12 '16 02:05 Piasy

Thank you for your help! BUILD SUCCESSFUL 非常感谢你的及时帮助!

Andecy avatar May 12 '16 03:05 Andecy

We actually do not require sources to be non null/empty anymore. That restriction is not imposed by buck, so we removed it recently

kageiit avatar May 12 '16 03:05 kageiit

i need to solution for these ``:app:signingReport Variant: debug Config: debug Store: C:\Users\Akintola Samson.android\debug.keystore Alias: AndroidDebugKey MD5: EC:EB:B2:13:EA:6C:CC:0B:81:DC:DD:3D:85:3A:4D:3C SHA1: AA:88:FB:33:6C:F5:F0:17:01:89:31:96:BD:94:D8:C3:89:28:E6:EE Valid until: Friday, December 13, 2047

Variant: releaseUnitTest Config: none

Variant: debugUnitTest Config: debug Store: C:\Users\Akintola Samson.android\debug.keystore Alias: AndroidDebugKey MD5: EC:EB:B2:13:EA:6C:CC:0B:81:DC:DD:3D:85:3A:4D:3C SHA1: AA:88:FB:33:6C:F5:F0:17:01:89:31:96:BD:94:D8:C3:89:28:E6:EE Valid until: Friday, December 13, 2047

Variant: debugAndroidTest Config: debug Store: C:\Users\Akintola Samson.android\debug.keystore Alias: AndroidDebugKey MD5: EC:EB:B2:13:EA:6C:CC:0B:81:DC:DD:3D:85:3A:4D:3C SHA1: AA:88:FB:33:6C:F5:F0:17:01:89:31:96:BD:94:D8:C3:89:28:E6:EE Valid until: Friday, December 13, 2047

Variant: release Config: none ----------``

paqadvault avatar Jan 26 '18 09:01 paqadvault

HOW I SOLVED THIS

This error occurs because you have set your build variants to release mode. set it to build mode and run project again.

If you want to run in release mode, just generate a signed apk the way we do it normally when releasing the app

BenjaminNjoroge avatar Jul 02 '18 03:07 BenjaminNjoroge