I'm trying to run an existing APK (created in Android Studio) via IntelliJ (through the Android emulator). Is it possible without adding the entire project to IntelliJ, but just the APK?
I know IntelliJ has an 'Android Support plugin', which enables a lot of Android-related features, but as far as I can see this is for developing apps in IntelliJ itself.
Could the 'Android App' run configuration be used for this? Doesn't seem like I can reference an existing APK here. When I try to create a new 'Android App' run configuration for the existing APK, I get the 'module not specified' error (see image). This indicates I have to create a new Android module, but I just want to run the already existing APK via the Emulator.
I could create a command-line executable which launches a snapshot (with the app in) in the emulator, but was hoping to use IntelliJ's Android support itself, so I don't have to worry about Android emulator install references (the APK/emulator should be distributed to other developers who should be able to run them from IntelliJ)
IntelliJ version: 2017.3 and 2019 have been tried
If your aim is solely to run an APK via the IntelliJ Emulator, you can do that. Launch AVD Manager
, Create Virtual Device, Choose a device definition, Select a system image, click Finish
The new virtual device will appear on the list, under Actions
column hit Launch this AVD...
(green Play sign). A Virtual Device should appear on the screen. Then simply drag the APK onto the "mobile screen", your app will be installed and you should be able to use it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.