Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: Release 2.1.0, Release 2.0.1
    • Component/s: Android
    • Labels:
    • Environment:

      Host OS: Windows, Mac OSX, Linux
      Android toolkit r17+

      Description

      Problem

      Currently developers familiar with how to using Android's command line tooling can run Titanium-built APKs against Android new x86 emulator, so long as those APKs were built to run against the Rhino runtime. If the apps are built to run against the V8 runtime, they fail with the following errors from logcat indicating issues with missing stlport libraries. If necessary I can recreate these logs, but they should occur anytime you run a Titanium-built android app using V8 on the Android x86 emulator.

      Proposed Solution

      The way I understand it is that V8 is compiled with the Android NDK. All code compiled with the Android NDK is architecture-specific, and to this point it has only been built for ARM architectures. I'm sure I'm oversimplifying, but a build of V8 against the x86 architecture would likely make it possible for V8-driven Titanium Android apps to be run on the Android x86 emulator.

        Issue Links

          Activity

          Hide
          Stephen Tramer added a comment - - edited

          Notes on x86 limitations:

          • x86 emulators do not support google APIs. In particular this means the android manifest cannot reference maps, and any applications which use maps will crash/not work in the x86 emulator.
          • x86 only works with android SDK r10 (2.3.3) and SDK r15 (4.0.3). Those emulators have to be installed separately from ARM emulators.
          • x86 may have launch errors involving HAXM (intel hardware acceleration) on some platforms. This is a known issue and Google/Intel are apparently working on fixing it.
          Show
          Stephen Tramer added a comment - - edited Notes on x86 limitations: x86 emulators do not support google APIs. In particular this means the android manifest cannot reference maps, and any applications which use maps will crash/not work in the x86 emulator. x86 only works with android SDK r10 (2.3.3) and SDK r15 (4.0.3). Those emulators have to be installed separately from ARM emulators. x86 may have launch errors involving HAXM (intel hardware acceleration) on some platforms. This is a known issue and Google/Intel are apparently working on fixing it.
          Hide
          Stephen Tramer added a comment -

          TESTING


          Before testing, make sure that you have both of the currently available x86 emulators installed (currently available for API r15 and r10). They can be retrieved through the android package management tool. For testing to provide the correct results you must install both currently available x86 emulators.

          Testing TiStudio

          NOTE: These steps are for Studio 2.0.2. Studio will eventually add ABI selection support and then testing will change significantly.

          Step 1.

          1. Create a new app
          2. Go to Run -> Run Configurations ...
          3. Select "Titanium Android Emulator"
          4. Select an API level which is NOT an x86 system image
          5. Click "Run"

          PASS: App runs
          FAIL: Any other result

          Step 2.

          1. Go to Run -> Run Configurations ...
          2. Select "Titanium Android Emulator"
          3. Select an API level which IS an x86 system image (currently only "Intel Atom x86 System Image Android 2.3.3")
          4. Click "Run"

          PASS: App runs
          FAIL: Any other result

          Testing avd detection

          Run the following, where $TITANIUM_SDK is the directory where your 2.1.0 SDK is installed, and $ANDROID_SDK is the directory where the Android SDK is installed

          $TITANIUM_SDK/android/avd.py $ANDROID_SDK
          

          You should see the following information in the output:

          • Every listed device will have an "abis" property, which is an array of the supported ABI levels; only the AVD associated with "4.0.3" is expected to have more than one value ([armeabi-v7a, x86].

          Testing build scripts

          $TITANIUM_SDK and $ANDROID_SDK are as above. You should run this command from the directory which contains the app, which has the name $APP_NAME and ID $APP_ID. $EMU_ID should be the emulator ID for an emulator which supports more than one ABI.

          > $TITANIUM_SDK/android/builder.py simulator $APP_NAME $ANDROID_SDK `pwd` $APP_ID $EMU_ID "HVGA" x86 ""
          

          PASS: The x86 emulator for 4.0.3 launches, and the app runs in it.
          FAIL: Any other result.

          You should then also test the other available ABI (likely armeabi-v7a):

          > $TITANIUM_SDK/android/builder.py simulator $APP_NAME $ANDROID_SDK `pwd` $APP_ID $EMU_ID "HVGA" armeabi-v7a ""
          

          PASS: The x86 emulator for 4.0.3 launches, and the app runs in it.
          FAIL: Any other result.

          Show
          Stephen Tramer added a comment - TESTING Before testing, make sure that you have both of the currently available x86 emulators installed (currently available for API r15 and r10). They can be retrieved through the android package management tool. For testing to provide the correct results you must install both currently available x86 emulators. Testing TiStudio NOTE: These steps are for Studio 2.0.2. Studio will eventually add ABI selection support and then testing will change significantly. Step 1. Create a new app Go to Run -> Run Configurations ... Select "Titanium Android Emulator" Select an API level which is NOT an x86 system image Click "Run" PASS: App runs FAIL: Any other result Step 2. Go to Run -> Run Configurations ... Select "Titanium Android Emulator" Select an API level which IS an x86 system image (currently only "Intel Atom x86 System Image Android 2.3.3") Click "Run" PASS: App runs FAIL: Any other result Testing avd detection Run the following, where $TITANIUM_SDK is the directory where your 2.1.0 SDK is installed, and $ANDROID_SDK is the directory where the Android SDK is installed $TITANIUM_SDK/android/avd.py $ANDROID_SDK You should see the following information in the output: Every listed device will have an "abis" property, which is an array of the supported ABI levels; only the AVD associated with "4.0.3" is expected to have more than one value ( [armeabi-v7a, x86] . Testing build scripts $TITANIUM_SDK and $ANDROID_SDK are as above. You should run this command from the directory which contains the app, which has the name $APP_NAME and ID $APP_ID . $EMU_ID should be the emulator ID for an emulator which supports more than one ABI. > $TITANIUM_SDK/android/builder.py simulator $APP_NAME $ANDROID_SDK `pwd` $APP_ID $EMU_ID "HVGA" x86 "" PASS: The x86 emulator for 4.0.3 launches, and the app runs in it. FAIL: Any other result. You should then also test the other available ABI (likely armeabi-v7a ): > $TITANIUM_SDK/android/builder.py simulator $APP_NAME $ANDROID_SDK `pwd` $APP_ID $EMU_ID "HVGA" armeabi-v7a "" PASS: The x86 emulator for 4.0.3 launches, and the app runs in it. FAIL: Any other result.

            People

            • Assignee:
              Stephen Tramer
              Reporter:
              Tony Lukasavage
            • Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development