# Build and run sample applications
Source: [https://docs.qualcomm.com/doc/80-63195-1/topic/Build-and-run-sample-applications.html](https://docs.qualcomm.com/doc/80-63195-1/topic/Build-and-run-sample-applications.html)
## Before you begin
You should finish setting up the following to build the demos.
1. ADB setup: [https://developer.android.com/studio/command-line/adb](https://developer.android.com/studio/command-line/adb).
2. Download and install [Android Studio](https://developer.android.com/studio).
3. Download and set up [Android NDK](https://developer.android.com/ndk) Version r25c.
4. Download and install Android SDK (SDK version 23 and build tools version 23.0.2)
5. Either Caffe, Caffe2, ONNX, PyTorch, TensorFlow or TensorFlow Lite.
6. Ensure Android SDK and NDK environment variables are properly set.
## About this task
Once you have set up all software requirements for the Android application development
environment, load the demo project in Android Studio, compile the project into an APK, and run
the sample application. You will need these items to run the sample application:
- [Qualcomm Neural Processing SDK](https://developer.qualcomm.com/sites/default/files/docs/snpe/index.html) release binary
- Model binaries. Steps to generate model binaries are provided with each sample
application.
## Procedure
1. Launch Android Studio. Select File > Open Project and select a project. Click OK.

2. From the Android Studio menu, select Build > Build APK.
The output APK Is generated at
/app/build/outputs/apk/debug.
3. Install the APK on the development kit: adb install
4. Run the application from the Android UI.
For an overview of how the demos should look, refer to the Individual readme pages on
GitHub. A demo GIF is provided for each demo, for reference.
**Parent Topic:** [Qualcomm Neural Processing SDK for AI](https://docs.qualcomm.com/doc/80-63195-1/topic/Qualcomm-Neural-Processing-SDK-for-AI.html)
## Rebuild a sample application with a newer version of the Qualcomm®
Neural Processing SDK
Source: [https://docs.qualcomm.com/doc/80-63195-1/topic/Build-and-run-sample-applications.html](https://docs.qualcomm.com/doc/80-63195-1/topic/Build-and-run-sample-applications.html)
### About this task
Current APKs are built with SDK release version 2.10.x. To rebuild, and run the APK
with a newer SDK release:
### Procedure
1. Verify whether the [Deep Learning Container (DLC)](https://docs.qualcomm.com/doc/80-63195-1/topic/Deep-Learning-Container--DLC-.html) model works with newer SDK
version. If not, re-convert the model binary to DLC using the newer SDK.
2. Update the SDK release AAR binary file in the APK source path.
3. For an application to work properly, use a single version of the SDK and copy the SDK
AAR from the release to the application source path. Use this SDK version to convert
model to DLC.
If the DLC was converted with a different SDK version (other than the SDK AAR
binary) – results are unpredictable.
Last Published: May 16, 2024
[Previous Topic
Solutions and sample applications](https://docs.qualcomm.com/bundle/publicresource/80-63195-1/topics/Solutions-and-sample-apps.md) [Next Topic
Qualcomm AI Engine Direct](https://docs.qualcomm.com/bundle/publicresource/80-63195-1/topics/Qualcomm-AI-Engine-Direct.md)