Generating unsigned, release apk with Android Studio -
i need generate unsigned, release apk (where else sign , release store- else handling keys , else). problem android studio throws error whenever try build:
app-flavorunsigned-release-unsigned.apk not signed. please configure signing information selected flavor using project structure dialog.
i've tried several, previous methods:
- failed @ creating artifact (can't find menus "artifacts" anywhere, although editing configurations found option choose custom artifact) [probably best bet]
- creating empty signing config
- creating custom flavor
- using terminal run
gradle assemble
orgradle assemblerelease
(which fail due 1 of important module libraries trying built)
here current [app's] build.gradle:
apply plugin: 'com.android.application' android { signingconfigs { unsigned { storepassword = "" keyalias = "" keypassword = "" } } compilesdkversion 19 buildtoolsversion "20.0.0" defaultconfig { applicationid "hiddenforclientprivacy" minsdkversion 13 targetsdkversion 20 versioncode 1 versionname "1.0" signingconfig signingconfigs.unsigned } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' signingconfig signingconfigs.unsigned } unsignedbuild { debuggable false versionnamesuffix '-unsigned' signingconfig signingconfigs.unsigned } debug { } } productflavors { flavorunsigned { versioncode = 1; } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:20.0.0' compile project(':slidingmenu') compile 'com.android.support:support-v13:20.0.0' compile 'com.github.castorflex.verticalviewpager:library:19.0.1' }
thank , help.
post-help edit: marked accepted answer shows, had clear out release block. furthermore, clicking on "run" button- should appropriately show error can't run unsigned release apk on emulator or device. accepted answer describes everything.
in release
build type, don't specify signingconfig
@ all, , build won't signed. release builds don't pick default signing config debug builds get, should work those.
there's discussion on adt-dev mailing list it.
bear in mind build android studio, you'll need go gradle tasks window , choose assemblerelease
task; normal builds via "make project" don't build final apk.
Comments
Post a Comment