How do you install an APK file in the Android emulator?

前端 未结 30 2168
滥情空心
滥情空心 2020-11-22 14:53

I finally managed to obfuscate my Android application, now I want to test it by installing the APK file and running it on the emulator.

30条回答
  •  孤独总比滥情好
    2020-11-22 15:14

    Copy .apk file in your SDK's platform-tools/ directory,then install the .apk on the emulator by using cmd(on windows):

    adb install .apk
    

    or

    ./adb install .apk
    

    If there is more than one emulator running, you can find all running emulators by this command:

    adb devices
    

    or

    ./adb devices
    

    then you must specify the emulator upon which to install the application, by its serial number, with the -s option. For example:

    adb -s emulator-5554 install path/to/your/app.apk
    

    or

    ./adb -s emulator-5554 install path/to/your/app.apk
    

提交回复
热议问题