Language server
elide lsp resolves an Android project’s Java sources against the classpath elide install exports under
.dev/dependencies/m2/. Run it once before starting the editor, and again after changing dependencies:
elide install
In an Android project the install also unpacks every .aar dependency and links the resources of every artifact,
so the exported classpath carries:
| From | Resolves |
|---|---|
The compileSdk platform’s android.jar | android.* |
Each .aar’s classes.jar, and plain jars | androidx.*, Material, Play services, … |
The generated R classes | R.string.app_name, R.layout.main, … |
| The test and instrumented-test classpaths | Robolectric, JUnit, AndroidX Test, Espresso |
Go to definition on an R field opens the generated R.java at that identifier. When the SDK has the platform’s
sources (sources;android-<N>), hover and go to definition on a framework type read them:
sdkmanager --install 'sources;android-36'
- The server has one classpath for every file under its root, so a
src/androidTestfile also sees host-test libraries, asrc/testfile instrumented-test libraries, and asrc/mainimport of a test-only library raises no diagnostic; the build keeps the scopes apart and reports it. - Definition on a JDK class reads the
lib/src.zipof the JDKJAVA_HOMEnames; Elide does not ship one (Other editors). - A resource added after the install resolves once
Ris rebuilt, byelide buildorelide install, and the server restarted. - No
BuildConfigclass exists to resolve: Elide does not generate one. - Kotlin sources are not served by
elide lsp.
Editor setup: IDE integration, Other editors.
Compose previews
Debug builds compile Compose code with source information, so preview tooling can locate each composable call
(Kotlin compiler). The template declares the ui-tooling module, which
carries the activity a device-side Compose preview launches; keep tooling modules in debug artifacts.
Agents
elide mcp in a project whose elide.pkl declares android, or a workspace root with such a member, adds tools
for driving the project. In any other project they are not listed.
| Tool | Runs | Mirrors |
|---|---|---|
android/sdk | Nothing: reads the SDK | elide project info |
android/sdk/install | android-sdk, installing | elide install --accept-android-licenses |
android/devices | Nothing: asks adb and avdmanager | elide project info |
android/avd | android-avd | elide build android-avd |
android/emulator/start | android-emulator, headless by default | elide build android-emulator |
android/emulator/stop | android-emulator-stop | elide build android-emulator-stop |
android/run | android-run[-emulator]-<app> --no-follow | elide run |
android/test | android-test-<app>[-on-<device>] | elide test --device |
android/test/host | The host tests | elide test |
- Each tool runs the build target its command runs, chosen by the same rules, so the two never disagree.
- Nothing is installed unless the call passes
acceptLicenses: true.android/sdk/installrequires it; a license recorded in the SDK does not stand in for it. android/runreturns once the app has launched, with the device, package and activity, whether the app is still running afterlogWaitMs(default 2000, at most 30000), and the lastlogLineslines of its log (default 200, at most 2000), or of the crash buffer if the app has died.android/testreturns each device’s totals, whether the run finished, and every test’s outcome with a failure’s stack trace;android/test/hostevery host test’s status and failure message.- A failed build returns
outcome: "failure"and up to 100 of the warnings and errors it reported. A request the project cannot satisfy (no application, several and none named, nothing instrumented) is a tool error naming what exists.
The android template’s MCP option writes a .mcp.json that registers elide mcp. Client setup and the other tools:
Project MCP server.