android - How to create a release signed apk file using Gradle? -


i have gradle build create release signed apk file using gradle.

i'm not sure if code correct or if i'm missing parameter when doing gradle build?

this of code in gradle file:

android {     ...     signingconfigs {           release {               storefile file("release.keystore")               storepassword "******"               keyalias "******"               keypassword "******"          }      } } 

the gradle build finishes successful, , in build/apk folder see ...-release-unsigned.apk , ...-debug-unaligned.apk files.

any suggestions on how solve this?

easier way previous answers:

put ~/.gradle/gradle.properties

release_store_file={path keystore} release_store_password=***** release_key_alias=***** release_key_password=***** 

modify build.gradle this:

...     signingconfigs {     release {        storefile file(release_store_file)        storepassword release_store_password        keyalias release_key_alias        keypassword release_key_password    } }  buildtypes {         release {             signingconfig signingconfigs.release         } } .... 

then can run gradle assemblerelease


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -