Skip to content

Give priority to SDK location in preferences #372

Closed
@codeanticode

Description

@codeanticode

Earlier versions of the mode gave priority to the ANDROID_SDK environmental variable, which would override the Processing preferences. This is switched around in the next version of the mode. The reason is the following: the environment SDK is likely to be used by Android Studio, and using the same SDK involves the risk of breaking the mode at some point, as Android Studio will run its own updater we don't have any control over. It may very well apply updates that are incompatible with the mode, as it happened a few months ago.

So the new logic is as follows:

  1. When user runs the mode for the first time (so, no SDK location in the preferences) and there is a valid SDK in the environment, the mode will ask to use that or to automatically download a separate one. This new dialog is motivated by the argument above (don't trust sharing SDK with Android Studio).

  2. From that point on, if the SDK location in the preferences is changed then it means that the user wants to use a custom SDK, so the mode should not revert back to the environment SDK.

  3. If the SDK folder stored in the preferences gets moved or deleted, the mode will ask again to use the environment SDK, if exists and is valid, or download a new SDK.

This logic preserves the important paths form the past approach (new user with no Android experience will get a new SDK automatically by the mode, users already using an SDK have the option to share with Processing or to get a separate one), while minimizing the risk of Android Studio updates breaking the mode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions