2

I am trying to sign my apk for release. In eclipse I could just go File->Export, type in my credentials and be good to go.

In Android Studio I read you have to execute the "gradle assembleRelease" command after setting up the gradle script.

I just can't figure out where to run this command? The Windows console does not recognize it, "where gradle" comes up empty aswell and I can only find a gradle.jar file that does not get executed in the console.

I just want to sign my apk for realease.

A. Steenbergen
  • 3,360
  • 4
  • 34
  • 51

2 Answers2

5

The New Project wizard places a launcher script for Gradle at the root of your project; on Windows it will be gradlew.bat. If you have the signing config set up in your build files, you can run this command:

gradlew.bat assembleRelease

Alternately, you can use the Generate Signed APK... command in the Build menu to guide you through the process.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163
  • Thanks! I found it after reading this answer http://stackoverflow.com/questions/20921456/android-studio-how-to-generate-signed-apk-using-gradle – A. Steenbergen Mar 25 '14 at 16:55
0

I had a same problem.

  1. Firstly you should go to file that include gradlew.bat with cd file1\.. .
  2. Now you can write gradlew.bat assembleRelease .
emre
  • 1