Katlock
Katlock

Reputation: 1396

how to deploy a signed APK from Android Studio

I have built and signed my APK from Android Studio. Now I want to run the signed APK in Android Studio. How can I do this?

thanks

Upvotes: 0

Views: 2550

Answers (3)

Daniel Nugent
Daniel Nugent

Reputation: 43322

The answer is that you don't use Android Studio.

Use the adb install command from the CLI:

adb install myApp.apk

For overinstall, use the -r parameter.

Here is what it should look like:

enter image description here

Upvotes: 2

Muntaser Ahmed
Muntaser Ahmed

Reputation: 4647

Add the following to your build.gradle:

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

These already answered questions may help you:

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

Android Studio - Run signed apk on emulator

Upvotes: 1

CodyEngel
CodyEngel

Reputation: 1501

This isn't really a typical use case and as such it's not really supported in the way you want. Here are 4 possible alternatives:

Changing your Build Variant to release is one way you can still deploy the app from Android Studio while being able to verify the signed version will work as expected.

If you are trying to install the app onto an emulator, you can simply drag and drop the signed APK from your folder into the emulator window and it will install the app for you.

For a physical device you can drag and drop the APK to your devices downloads folder, from the device you now view your downloads and tap the APK and select install.

You can also just drag and drop the APK into Google Drive or Dropbox and download it from your phone and run it that way.

Upvotes: 3

Related Questions