Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24681

Android: AVD detection fails if matching SDK is not installed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0, Release 6.0.4
    • Fix Version/s: Release 6.1.0
    • Component/s: Android
    • Labels:
      None
    • Environment:

      OS: Mac OS X 10.11.6
      NodeJS: 4.7.2
      TiSDK::6.0.4.GA / 6.1.0.v20170510131349

    • Sprint:
      2017 Sprint 10 Tooling

      Description

      Steps to reproduce the behavior
      1. Create an AVD in Android Studio via Tools > Android > AVD Manager without the matching SDK being installed, e.g. AVD with Android 5.1 but no SDK 22 installed. This will download the required Google APIs System Image but not the SDK.
      2. Try to run an app on that emulator with appc run -p android -C <emulator-id> -l trace

      Actual behavior
      The build crashes with the following error:

      2017-05-11T14:00:12.722Z | ERROR  | Cannot read property 'name' of undefined
      2017-05-11T14:00:12.722Z | TRACE  | TypeError: Cannot read property 'name' of undefined
          at /Users/jvennemann/Library/Application Support/Titanium/mobilesdk/osx/6.1.0.v20170510131349/node_modules/node-titanium-sdk/lib/android.js:671:23
      

      Expected behavior
      The build succeeds and the app launches on the specified AVD.

      Additional notes
      This also breaks appc info with the unhelpful error:

      2017-05-11T22:19:03.961Z | ERROR  | Error: titanium exited with exit code 1. re-run with -l trace to get detailed output
          at ChildProcess.<anonymous> (/Users/jvennemann/.appcelerator/install/6.2.0/package/lib/commands/info.js:45:23)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                jvennemann Jan Vennemann
                Reviewer:
                Jan Vennemann
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10677
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code