Search code examples
trigger.ioforge

how can I use a different Android sdk and resolution simulator


How can I use a different Android sdk and resolution simulator with testing use forge?

I have tried to change it within AVD Manager, but it doesn't work.


Solution

  • You can specify a different Android SDK to use with the android.sdk parameter (http://docs.trigger.io/en/v1.3/tools/local-config.html#android)

    E.g. on a command-line,

    forge build --android.sdk /Applications/sdk
    

    In your local_config.json:

    {
      "android": {
        "sdk": "/opt/local/android-sdk"
      }
    }
    

    To use different AVD levels or otherwise customise the emulator, open the Android SDK manager, then the AVD manager. Create, customise and start whatever AVD you want.

    Note: you cannot use 2.3 AVDs, due to a bug in the emulator.

    Next time you use forge run android, we will use that manually started emulator.