[Android-tools-devel] Simple Instructions for Using Android SDK on Stretch
Hans-Christoph Steiner
hans at at.or.at
Mon Mar 13 14:35:39 UTC 2017
Thanks! I posted this a few places:
* https://wiki.debian.org/AndroidTools#Building_apps_with_these_packages
*
https://guardianproject.info/2017/03/13/build-android-apps-with-debian-apt-install-android-sdk
And soon, https://bits.debian.org
.hc
殷啟聰:
> Here are the steps for building Android apps using Debian's Andoid SDK
> on Stretch. It can be included in the release notes.
>
> Currently there is only the target platform of API Level 23 packaged,
> so we can only build apps targeted at android-23. We will add more API
> Levels after via backports afterwards. Apart from this, only
> Build-Tools 24.0.0 is available. So in order to use the SDK, build
> scripts need to be modified.
>
> 1. sudo apt install android-sdk android-sdk-platform-23
> 2. export ANDROID_HOME=/usr/lib/android-sdk
> 3. In `build.gradle`, change `compileSdkVersion` to 23 and
> `buildToolsVersion` to 24.0.0
> 4. gradle build
>
> The Gradle Android Plugin is also packaged. In order to use it instead
> of the one from online Maven repositories, do the following before
> running Gradle:
>
> 1. In `buildscript {}` block, add `maven { url
> 'file:///usr/share/maven-repo` }` to repositories
> 2. In `buildscript {}` block, use
> `com.android.tools.build:gradle:debian` as the plugin classpath
>
> Beware that the Lint in this version of Gradle Android Plugin always
> fails, so make sure not to run the `:lint` tasks or turn off
> `lintOptions.abortOnError`.
>
> In Sid (and stretch-backports), the Gradle Android Plugin is patched
> to work with Debian's Android SDK. It detects what versions of API
> Levels and Build-Tools are available and you no longer need to modify
> the build scripts. In order to build apps, do the following:
>
> 1. sudo apt install android-sdk android-sdk-platform-23 android-sdk-helper
> 2. export ANDROID_HOME=/usr/lib/android-sdk
> 4. gradle build --init-script /usr/share/android-sdk-helper/init.gradle
>
> Thus, `init.gradle` forces Gradle to use the Gradle Android Plugin in
> Debian and the plugin will do the rest.
>
> Do reply this email if anyone have any questions.
>
> Cheers,
> Kai-Chung Yan
>
> _______________________________________________
> Android-tools-devel mailing list
> Android-tools-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
>
More information about the Android-tools-devel
mailing list