Using ADB Over USB with Neovim
Step 1: Creating a KMM Application
The first step is to create a Kotlin Multiplatform Mobile (KMM) application. You can easily generate the basic project structure using the online web wizard provided by Kotlin. This will set up a solid foundation for your cross-platform application.
Step 2: Handling Permissions and Architecture Issues
Before moving forward, you might need to perform some "black magic" to deal with permissions and minute errors related to your machine's architecture. This might involve updating dependencies or adjusting your Gradle scripts to ensure compatibility.
Step 3: Using Neovim for Development
This article focuses on using Neovim to handle the development workflow. Here’s how to proceed:
- Open Neovim and use the hotkey
Ctrl+Shift+-
to open a terminal within Neovim. - Run the following commands to sync Gradle, clean the project, and build it:
./gradlew clean ./gradlew build
- Connect your Android device via USB, then check the connection with:
adb devices
- Once your device is listed, install the debug build of your app using:
./gradlew installDebug
- Finally, launch the app on your device with:
adb shell am start -n org.example.zraille/.MainActivity
And there you have it—your app should now be running on your Android device, all managed from within Neovim.