Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-255] Appcelerator Studio not detecting android emulator and emulator doesn't come up on windows 7

GitHub Issuen/a
Resolution Date2018-10-25T13:20:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsandroidlib, appcd
ReporterMostafizur Rahman
AssigneeChris Barber


Hello, We have an Enterprise customer who is facing an issue with Appcelerator Studio. Appcelerator Studio not detecting android emulator and emulator doesn't come up on windows 7. We have attached the screenshot, Studio Diagnostic log and *appc ti setup check* log file. If any others information needed please let us know. Thanks


Appc Daemon Dump.txt2018-04-27T13:11:16.000+0000464670


  1. Kondal Kolipaka 2018-04-27

    Looking at the Screenshot.jpg - C:\android-sdk-win is not recognised as a valid android SDK path. Investing further on this Can you also provide the "Appc Daemon Dump" for studio In Studio, go to Help > Studio > Generate Appc Daemon Dump. It generates the appc daemon dump and provide you the location for the generated file.
  2. Kondal Kolipaka 2018-04-27

    Looks like Appc daemon is unable to find the android emulators. To confirm on this, can you run the following command and attach appcd.log to the ticket.
       $ appc appcd exec /system-info/1.x/info > appcd.log
  3. Kondal Kolipaka 2018-04-27

    [~eharris] [~cbarber] I think we were having a similar issue earlier, do you guys recall the ticket for this
  4. Mostafizur Rahman 2018-04-27

    I have attached the required logs named: Appc Daemon Dump.txt and appcd_log.txt. Thanks
  5. Ewan Harris 2018-05-04

    [~mrahman] Apologies they will have to start the daemon first, so the steps are the following 1. appc appcd start, should log Appc Daemon started 2. appc appcd exec /system-info/1.x/info, check it looks ok 3. appc appcd exec /system-info/1.x/info > appcd.log Then upload that appcd.log file
  6. Kondal Kolipaka 2018-05-09

    [~eharris] Do you see any issue from the appc daemon dump [^Appc Daemon Dump.txt]
  7. Kondal Kolipaka 2018-05-09

    Maybe we can debug the below command and see where it's hanging.
       set DEBUG=* && appc appcd exec /system-info/1.x/info
  8. Kondal Kolipaka 2018-05-14

    Doesn't seem to be the studio issue, hence I'll move the component to DAEMON project to get the high priority
  9. Chris Barber 2018-05-16

    I'm not convinced this is a daemon issue. It's obvious that "ti info" cannot see the emulators, but that's not the same source that Studio pulls from to get the list of emulators. There is no appc appcd exec /system-info/1.x/info output attached to this ticket. It would be better to attach the output of just the Android info by running either appc appcd exec /system-info/1.x/info/android or appc appcd exec /android/1.x/info. This output would tell us if the daemon can detect the emulators, however if it doesn't detect the emulators it won't tell us _why_ it couldn't detect the emulators. To get the why, we need an appc appcd dump output.json immediately after running appc appcd exec /android/1.x/info.
  10. Mostafizur Rahman 2018-05-17

    [~cbarber], Command: appc appcd exec /android/1.x/info they are able to get the output, attached the same for reference (appcd_android_info.txt). But the Below 2 commands appc appcd exec /system-info/1.x/info appc appcd exec /system-info/1.x/info/android is running for more than 4 hrs. There was no o/p as mentioned in attached screenshot (image001, image002).
  11. Chris Barber 2018-05-17

    [~mrahman] They probably just need to restart the daemon: appc appcd restart. They also should upgrade to the latest Appcelerator CLI so that it pulls down the latest appcd version.
  12. Mostafizur Rahman 2018-05-22

    Hello [~cbarber], They have restarted the daemon by using *appc appcd restart*. Then upgraded the latest Appcelerator CLI but still facing the same issue. Appcelerator Studio not detecting android emulator and emulator doesn't come up on windows 7. They have emulators available in Appcelerator, but they still have the error persists as “Problem detected with the SDK settings”. Due to which emulator is not selected by default. Provided the screenshot for your reference. In another screenshot, they tried to build the project in cmd prompt but getting an error as “Unable to find any emulators”. Img-02-22-05-2018.jpg and Img-01-22-05-2018.jpg reference as screenshot.
  13. Chris Barber 2018-05-22

    [~mrahman] I noticed is the AVD directory is C:\android-sdk-win\.android\avd. This is a non-standard location. Usually it is in the user's home directory. Titanium SDK *does not *support a non-standard AVD location. It must be in C:\Users\<user>\.android\avd. Appc Daemon _does_ support non-standard AVD locations, but it must be manually set by running appc appcd config android.avd.path C:\android-sdk-win\.android\avd. If you do this, then run appc appcd exec /appcd/plugin/stop/android and Studio should start displaying the list of emulators. However, if you move the AVDs to the user's home directory to make Titanium SDK happy as indicated above, then do not set the android.avd.path.
  14. Mostafizur Rahman 2018-05-24

    We have shared this with the customer and waiting for his update. Thanks
  15. Mostafizur Rahman 2018-06-14

    [~cbarber], We have an update from the customer. The customer replied: Sorry for the delayed response, I was on a business trip and could not get back. Here is the last error response from the compiler:
    alloy compile --platform android
        throw e;
        SyntaxError: Unexpected character '?' (68:0)
        at Parser.pp$5.raise (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:4454:13)
        at Parser.getTokenFromCode (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:1147:10)
        at Parser.readToken (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:776:19)
        at Parser.nextToken (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:766:19)
        at Parser.next (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:691:10)
        at Parser.eat (C:\Users\A78986\AppData\Roaming\npm\node_modules\alloy\node_modules\babylon\lib\index.js:698:12)
        at Parser.pp$1.parseBlockBody (C:\Users\A78986\AppData\Roaming\npm\node_m
  16. Chris Barber 2018-06-14

    That looks to be an Alloy error, not a Daemon related error. [~mrahman] Can we get a reproducible test case from the customer? [~fmiao] What do you make of the "Unexpected character" error above?
  17. Feon Sua Xin Miao 2018-06-14

    Why is it loading alloy from \AppData\Roaming\npm\node_modules\? What's the alloy version? Can we have the complete build log?
  18. Mostafizur Rahman 2018-06-15

    [~fmiao], Here is the answers from the customer regarding your questions: 1) It is the same way it loads initially before this issue happened. 2) 1.11.0 3) Attaching the log named complete-Build-log.txt
  19. Feon Sua Xin Miao 2018-06-18

    [~mrahman], I could reproduce a similar error when I misplaced a ? in alloy.js. If you run appc with debug enable, you should get more information on exactly which line causes the issue.
        [INFO]  [app.js] Titanium entry point processing...
        [DEBUG] var Alloy = require('/alloy'),
        [DEBUG]         _ = Alloy._,
        [DEBUG]         Backbone = Alloy.Backbone;
        [DEBUG] console.log('a')?;
        [DEBUG] Alloy.createController('index');
        [DEBUG] .../.appcelerator/install/7.0.2/package/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:97
        [DEBUG]         	throw e;
        [DEBUG]         	^
        [DEBUG] SyntaxError: Unexpected token (11:15)
        [DEBUG]     at Parser.pp$5.raise (.../.appcelerator/install/7.0.2/package/node_modules/alloy/node_modules/babylon/lib/index.js:4454:13)
        [DEBUG]     at Parser.pp.unexpected (.../.appcelerator/install/7.0.2/package/node_modules/alloy/node_modules/babylon/lib/index.js:1761:8)
  20. Ewan Harris 2018-10-25

    Closing based off feedback

JSON Source