Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can deploy signed APK when click Run in Android Studio?

I am developing an app which uses Google APIs. I have created credentials at "Google Developers Console". If I creates a signed APK, and run it on the phone, there is no problem.

The problem is, while I developing the app, when I click RUN button, it deploys an unsigned version of the app on the phone. Thus the application does not work.

How can I set Android Studio to make it deploy signed APK on the phone when click RUN button?

like image 564
fthdgn Avatar asked Nov 22 '14 19:11

fthdgn


People also ask

Can I upload unsigned APK to play store?

It is not possible to publish unsigned APK on Google Play. 5) Generate new signed APK using keyStore file provided by your developer 6) after generating new signed APK, you can update your existing google play application by new APK.


2 Answers

Add these values to your .gradle:

signingConfigs{     debug{         keyAlias 'your key alias'         keyPassword 'your keypassword'         storeFile file('keystore path')         storePassword 'your storepassword'     } } buildTypes {     debug{         signingConfig signingConfigs.debug     } }   

The keystore path in the file will be something like E:/xxx/xxx/xx.keystore.

like image 151
floatingmuseum Avatar answered Sep 19 '22 20:09

floatingmuseum


Usually I do it from command line, installing via "adb install -r file.apk" (-r to preserve app's data)

Also it can be done via Gradle and project settings, see answers here: Android Studio - Run signed apk on emulator

like image 21
Mixaz Avatar answered Sep 19 '22 20:09

Mixaz