| @@ -0,0 +1,47 @@ | |||
| 1 | + | # AndroidSDK Setup (Linux) | |
| 2 | + | ||
| 3 | + | ## Install Android CLI | |
| 4 | + | ||
| 5 | + | - First download and install the latest version of `android cli` | |
| 6 | + | ```console | |
| 7 | + | $ curl -fsSL https://dl.google.com/android/cli/latest/linux_x86_64/install.sh | bash | |
| 8 | + | ``` | |
| 9 | + | ||
| 10 | + | ## Install Android Debug Bridge (adb) | |
| 11 | + | - This tool allows you to communicate with your android device. | |
| 12 | + | - When a bridge is established you can install you application onto the device | |
| 13 | + | ```console | |
| 14 | + | $ sudo apt update | |
| 15 | + | $ sudo apt install adb | |
| 16 | + | ``` | |
| 17 | + | - Run with | |
| 18 | + | ```console | |
| 19 | + | $ adb start-server | |
| 20 | + | ``` | |
| 21 | + | ||
| 22 | + | ## Emulation | |
| 23 | + | ||
| 24 | + | - First you have to create an emulator | |
| 25 | + | ```console | |
| 26 | + | $ android emulator create | |
| 27 | + | ``` | |
| 28 | + | - Run with: | |
| 29 | + | ```console | |
| 30 | + | $ ~/Android/Sdk/emulator/emulator @medium_phone -no-snapshot -gpu swiftshader_indirect | |
| 31 | + | ``` | |
| 32 | + | ||
| 33 | + | ## Gradle | |
| 34 | + | - This is the used android application build system | |
| 35 | + | - In your project create the `gradlew` build script | |
| 36 | + | - The first time you run the script gradle will setup everything you need | |
| 37 | + | - To build and install your application on the connected device run: | |
| 38 | + | ```console | |
| 39 | + | $ ./gradlew installDebug | |
| 40 | + | ``` | |
| 41 | + | ||
| 42 | + | --- | |
| 43 | + | ||
| 44 | + | ## References | |
| 45 | + | - AndroidCLI - https://developer.android.com/tools/agents | |
| 46 | + | - Android Debug Bridge (adb) - https://en.wikipedia.org/wiki/Android_Debug_Bridge | |
| 47 | + | - gradlew script - http://gist.netimaro.si/tilc/gradlew | |
tilc / AndroidSDK Setup (Linux)
Last active 5 hours ago
Instructions for setup of android development on Linux with AndroidCLI
tilc revised this gist 5 hours ago · 45cec2f
1 file changed, 47 insertions