[DAEMON-129] Android Plugin: Populate emulator target, api level, and sdk using default Android SDK

GitHub Issuen/a
Resolution Date2017-11-22T20:03:39.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 1.0.0
ReporterChris Barber
AssigneeEwan Harris


To get the Android emulator's target, api level, and sdk name, we need to pass in an SDK for it to pull those bits of info. The problem is there could be more than one SDK. The Android plugin needs to select the best SDK starting with the one in specified in the config, then pass it into getEmulators().




  1. Ewan Harris 2017-11-17 Androidlib: https://github.com/appcelerator/androidlib/pull/14 appc-daemon: https://github.com/appcelerator/appc-daemon/pull/159
  2. Kondal Kolipaka 2017-11-21 Since I'm blocked by DAEMON-167 so I asked [~cbarber] to provide the system-info with the latest daemon( 7.0.0-master.34). I'm still seeing the same issue where Android emulators are missing the target,sdkversion and apilevel values. As I mentioned here DAEMON-148, targets also missing at the android root level. Here is the system-info: https://gist.githubusercontent.com/cb1kenobi/6cb5e2de3cda28c25fdd1942a118ba55/raw/518bcdbf45502249ec63670025f4c1c5bb39e1c2/sysinfo.json
  3. Ewan Harris 2017-11-22 [~kkolipaka] To provide the target, sdk-version and api-level values we need 2 pieces of data. - The systemImage to exist in the systemImages object of an SDK info - The sdk property of that systemImage to match the sdk property of an platform within the platforms array of and SDK info This matches the same behaviour of ti info In Chris' info he has no systemImage values, so we're unable to lookup the info, hence the properties stay as null. Here's my info for a Windows machine (side note I just found a bug that on Windows this information is not actually populated by titanium) https://gist.github.com/ewanharris/056bf5e02e69779993b30948f051b78a Between the main and mainAfterDelete I deleted my platforms/android-25 folder. When the scan reran it was unable to find a platform matching the SDK level in android-25/google_apis/x86, so the data stayed null. The titanium info never populates because of a bug in node-titanium-sdk, which I'll file a ticket for shortly
  4. Ewan Harris 2017-11-22 [~kkolipaka] Sorry I just realised the missing targets at android root comment you made, I made a PR here for it. https://github.com/appcelerator/appc-daemon/pull/184 Here's a diff of the two outputs (daemon on left, ti info on right) https://www.diffchecker.com/LaX19v13. There's some bits missing, supported flag on platforms and addons and some vendor info on addons, is there anything you require that's missing?
  5. Kondal Kolipaka 2017-11-22 Thanks for that. We would need *based-on*, *api-level*, *android-version* values. And, Studio is not using Vendor info and add-on. https://github.com/appcelerator/titanium_studio/blob/e2df52e82a128f7d0427f195264512b49c2eca16/plugins/com.appcelerator.titanium.android.core/src/com/appcelerator/titanium/android/core/DaemonAndroidSDKLocator.java#L521
  6. Kondal Kolipaka 2017-11-23 I can't see targets for android with the latest daemon. I'm on 7.0.0-master.44 [^appcd_master44_systeminfo1.json] [^appcd_mater44_dump.json]
  7. Ewan Harris 2017-11-23 [~kkolipaka] Looking at the log the previous version of the daemon in cli 7.0.0-master.40 is still running, if you install the latest appc npm package \[sudo\] npm i appcelerator@4.2.11-4 -g it will stop the daemon before installing/selecting a core.
  8. Kondal Kolipaka 2017-11-23 That's a problem! I was expecting appc use 7.0.0-master.44 will stop the daemon. That didn't happen. https://github.com/appcelerator/appc-install/pull/89
  9. Ewan Harris 2017-11-23 That only got published in the last couple days, as 4.2.11-4, from the logs it looks like you have 4.2.11-2

JSON Source