2

Using Android Studio 0.6.1 (actually on OSX), normally I have build variant set on "debug".

enter image description here

I have a phone plugged in "Connected as a media device". I click the "Run" button up top.

enter image description here

Everything works fantastically well.

However. Say I change this to "release" ...

enter image description here

it seems impossible, to now send it over the USB to the phone?

I understand that to publish to the playstore, I use "release" and use "build signed apk", using the password for the keystone. That works perfectly.

SoBut can I just "leave it on" "release" mode while working with the tethered phones?

(With iOS development for example, the "debug" setting is just annoying and sucks, and you can just leave it on "release" all the time, basically. Indeed you can just delete the "debug" variant.)

thanks, Android aces!!


Here's the error that appears if you try to send a "release" build over the USB cable to a tethered phone.

enter image description here

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Fattie
  • 27,874
  • 70
  • 431
  • 719

1 Answers1

1

The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer.

Have you set up a key-store for signing the release build?

for details using gradle see how-to-create-a-release-signed-apk-file-using-gradle

With android studio 0.5.9 you can use Module settings [F4]/app signing to define the key store.

Community
  • 1
  • 1
k3b
  • 14,517
  • 7
  • 53
  • 85
  • For sure, everything works absolutely perfectly, **when creating a release build** to save on my desktop and then send to the playstore (or whatever). We have apps for clients actually on the play store, and it all works, hooray. My problem is, it appears I can't use a tethered device, without changing to "debug". Is there a way to use "release" with a tethered ADB device? Cheers... – Fattie Jun 20 '14 at 11:31
  • oh i see: if you run "gradle --gui" there is a gradle task "installDebug" but there is no gradle taks "installRelease". so your actual quiestion should be "how to creade android gradle task "installRelease"? manually you can execute on the commandline "adb install /path/to/file.apk". but maybe there is a better way to do it – k3b Jun 20 '14 at 11:40