= Android Application Sample

[.download]
- link:zips/sample_android_application-groovy-dsl.zip[icon:download[] Groovy DSL]
- link:zips/sample_android_application-kotlin-dsl.zip[icon:download[] Kotlin DSL]

NOTE: You can open this sample inside a Android Studio IDE using the https://developer.android.com/studio/projects/create-project#ImportAProject[project importer].

This sample shows how a simple Android application written in Java can be built with Gradle.
The application was created following the https://developer.android.com/training/basics/firstapp[Build your first app guide].

====
include::sample[dir="samples/android-application/groovy",files="build.gradle[]"]
include::sample[dir="samples/android-application/kotlin",files="build.gradle.kts[]"]
====

To build the application:

====
[.testable-sample,dir="groovy"]
=====
[.sample-command]
----
$ ./gradlew build

> Task :app:lint
Calling mockable JAR artifact transform to create file: /home/user/.gradle/caches/transforms-2/files-2.1/00fe5f39bae298f5f8203731bd0560d9/android.jar with input /opt/android/sdk/platforms/android-28/android.jar
Ran lint on variant debug: 5 issues found
Ran lint on variant release: 5 issues found
Wrote HTML report to file:///home/user/app/build/reports/lint-results.html
Wrote XML report to file:///home/user/app/build/reports/lint-results.xml

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1m 0s
55 actionable tasks: 55 executed
----
=====
====

For more information, we suggest reading link:{userManualPath}/getting_started.html[Getting Started with Gradle].
You can also find https://developer.android.com/guide[Android development related information inside the guides provided by the Android team].
