How to install an apk on the emulator in Android Studio?

后端 未结 13 1915
温柔的废话
温柔的废话 2020-12-02 05:24

How do you install an apk on the emulator in Android Studio from the terminal?

In Eclipse we did

/home/pcname/android-sdks/platform-tools/adb -s em         


        
相关标签:
13条回答
  • 2020-12-02 06:07

    Run simulator -> drag and drop yourApp.apk into simulator screen. Thats all. No commands.

    0 讨论(0)
  • 2020-12-02 06:11

    Drag and drop apk if the emulator is launched from Android Studio. If the emulator is started from command line, drag and drop doesn't work, but @Tarek K. Ajaj instructions (above) work.

    Note: Installed app won't automatically appear on the home screen, it is in the apps container - the dotted grid icon. It can be dragged from there to the home screen.

    0 讨论(0)
  • 2020-12-02 06:11

    Just download the apk from talkback website

    Drag the downloaded apk to the started emulator, Go to settings on emulator > Search for talkback, you will now find it there

    0 讨论(0)
  • 2020-12-02 06:11

    In Android Studio: View - Tool Windows - Gradle

    In the Gradle tool window navigate to your :app - Tasks - install and then execute (by double-clicking): any of your install*tasks: e.g. installDebug, installRelease

    Note: the apk will also automatically installed when you Run your application

    0 讨论(0)
  • 2020-12-02 06:12

    For Linux: once emulator is running, the following worked for me.

    Because I installed the Android SDK on my home directory, I have the following file structure:

    • home/Android/Sdk/platform-tools/adb

    • home/AndroidStudioProjects/Metronome.adk

    AndroidStudioProjects is a file folder I made for my Android projects. "Metronome.adk" is the file I want to run.

    So, using Terminal from the home directory...

    ./Android/Sdk/platform-tools/adb install ./AndroidStudioProjects/Metronome.adk
    

    Being a Linux novice, I often forget the need to put the "./" in when trying to locate a file or run a command.

    After the command achieves "Success", the app is in the Apps area of the emulator and can be run.

    0 讨论(0)
  • 2020-12-02 06:14

    In android studio emulator to run an apk file just drag the apk into the emulator.The emulator will install the apk

    0 讨论(0)
提交回复
热议问题