2018-05-10 20:04:30 +02:00
# <img src="./../images/androidlogo.png" alt="" height="32px"> Vulkan examples on Android
2016-02-16 15:07:25 +01:00
2016-03-22 22:51:36 +01:00
## Device support
- **To run these examples you need a device with an Android image that suports Vulkan**
2018-05-10 18:42:03 +02:00
- Builds currently only support arm-v7, other architectures may be added later
2016-03-22 22:51:36 +01:00
- Basic gamepad support is available too (zoom and rotate)
2017-06-17 11:32:20 +02:00
- Basic touch control support (zoom, move, rotate, look)
2016-03-22 22:51:36 +01:00
## Building
### Requirements
2016-03-26 11:49:37 +01:00
2018-05-10 18:42:03 +02:00
- [Android Studio ](https://developer.android.com/studio/ )
- [Android NDK ](https://developer.android.com/ndk/downloads/ ) (r11b or higher)
- [Android SDK ](https://developer.android.com/studio/index.html )
2016-03-26 11:49:37 +01:00
2018-05-10 18:42:03 +02:00
### Update the asset pack
2016-03-26 11:49:37 +01:00
2018-05-10 18:42:03 +02:00
During the Android build process, assets are copied over from the data folder, so it's important to make sure that a current version of the [asset pack ](../data/README.md ) has been downloaded and extracted.
2016-03-26 11:49:37 +01:00
2018-05-10 18:42:03 +02:00
### Building the Examples
2017-06-17 11:32:20 +02:00
2018-05-10 18:42:03 +02:00
Select **Import project** from the welcome screen (or from inside Android via **File->New** ):
2017-06-17 11:32:20 +02:00
2018-05-10 18:42:03 +02:00
< img src = "androidstudio01.jpg" alt = "" width = "384px" >
2017-06-17 11:32:20 +02:00
2018-05-10 18:42:03 +02:00
Navigate to the **android** subfolder of this repository (should be higlighted with a gadle symbol):
2017-06-17 11:32:20 +02:00
2018-05-10 18:42:03 +02:00
< img src = "androidstudio02.jpg" alt = "" width = "384px" >
2016-02-16 15:07:25 +01:00
2018-05-10 18:42:03 +02:00
Select OK to start the import.
2016-02-16 15:07:25 +01:00
2018-05-10 18:42:03 +02:00
**Note:** Initial import will take a while due to the number of examples.
2016-02-16 15:07:25 +01:00
2018-05-10 18:42:03 +02:00
Once the import is done, the samples can be build, debugged and run from inside Android Studio just like any other Android project.
2016-07-19 22:06:19 +02:00
2018-05-10 18:42:03 +02:00
**Note:** If you update the repository at a later point you may have to resync to have additional examples added to the Android Studio project (**File->Sync Project with Gradle files**).