Android: Difference between revisions

imported>Jmarmstrong1207
mNo edit summary
imported>Jmarmstrong1207
No edit summary
Line 6: Line 6:
# [https://sandervanderburg.blogspot.de/2014/02/reproducing-android-app-deployments-or.html  Reproducing Android app deployments]
# [https://sandervanderburg.blogspot.de/2014/02/reproducing-android-app-deployments-or.html  Reproducing Android app deployments]


When creating emulators with Nix's emulateApp function as mentioned in the first link, your IDE should now be able to recognize the emulator but you won't be able to run the code. To run it, view the first link on how to run the apk file in the emulator.


When creating emulators with Nix's emulateApp function as mentioned in the first link, your IDE should now be able to recognize the emulator and run your code within it.
To run emulateApp, build it with <code>nix-build fileName.nix</code>. It'll build in the folder <code>result</code>. run it with <code>./result/bin/run-test-emulator</code>
 
=== Example ===
Here is an example emulator:
<syntaxhighlight lang=nix>
with import <nixpkgs> {};
 
androidenv.emulateApp {
  name = "emulate-MyAndroidApp";
  platformVersion = "28";
  abiVersion = "x86"; # armeabi-v7a, mips, x86_64
  systemImageType = "google_apis_playstore";
}
</syntaxhighlight>
 
build it with <code>nix-build fileName.nix</code>. It'll build in the folder <code>result</code>. run it with <code>./result/bin/run-test-emulator</code>


== Creating emulators without Nix ==
== Creating emulators without Nix ==