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

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

    On Linux I do this:

    1. first see which devices I currently have: emulator -list-avds
    2. build the release cd android && ./gradlew assembleRelease
    3. install it at the emulated device "Nexus5" (you are inside the android directory, else use the full path to apk): adb -s '8e138a9c' install app/build/outputs/apk/app-release.apk

    Thats it. You can also use ./gradlew installRelease

提交回复
热议问题