You must specify signing config for app release build type
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
Just as the error message said:
You must specify signing config for app release build type
thank your response! I can not understand how to specify?what means build type
android {
...
signingConfigs {
release {
storeFile file('../debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
...
}
thank you!I config this bug like your code but A new bug throw:
AndroidLibraryRule srcs must be non-null.
Do you have a library module that contains no source set?
thanks!yep it is,How can I do ?
Add a source set for it could fix this.
those modules have the kind of catolog:
|-src
|-main
|-res
so add a source set is like this?
|-src
|-main
|-res
|-java
|-com.package
yes, actually, only java is needed
Thank you for your help!
BUILD SUCCESSFUL
非常感谢你的及时帮助!
We actually do not require sources to be non null/empty anymore. That restriction is not imposed by buck, so we removed it recently
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 ----------``
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