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

前端 未结 30 1710
滥情空心
滥情空心 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:13

    Let's suppose you have to install Facebook APK on your emulator.

    You can use adb to install the APK to the running emulator in OS X like this:

    ./adb install ~/FBAndroid-2.1.apk
    

    And on Windows, like this:

    adb install %HOMEPATH%\FBAndroid-2.1.apk
    

    Once complete, check the apps screen of the emulator to check that the app has been installed correctly. If you need to force the upgrade of this app from a previous version, add the -r flag, like this on OS X:

    ./adb install -r ~/FBAndroid-2.1.apk
    

提交回复
热议问题