This tutorial describes how to integrate Android Frame Pacing into your toolchain, how to use the functions that the library provides, and how to verify that your frame pacing has improved. Android Frame Pacing is available as a static or shared library in the AGDK Libraries.
Get started
- Clone the
games-samples
repository. - Follow the instructions in the prerequisites section of the AGDKTunnel README.
Run the AGDKTunnel sample in Android Studio. This example project integrates Android Frame Pacing into a game that uses Vulkan for rendering.
- Open Android Studio.
- Click Project > Open and select the
/games-samples/agdk/agdktunnel
directory. - Wait for Android Studio to sync the project.
- Connect a device or create a virtual device to run the sample (for more information, see Build and run your app).
- Select the target device and click Run .
The sample APK should build and install on the target device. If you encounter errors, check the following:
- You have a supported version
of the Android SDK; see the
compileSdkVersion
field in the app modulebuild.gradle
file for more information. You can update the SDK version from the SDK Platforms tab in the SDK Manager. - You have a supported version
of the Android NDK; see the
ndkVersion
field in the app modulebuild.gradle
file for more information. You can install a specific version of the NDK from the SDK Tools tab in the SDK Manager. - The
local.properties
file in the project does not have an entry forndk.dir
. This location is specified by Android Studio and uses the NDK version from above. If you have this entry, clear the entire line. - After any build setting change, clean the project (Build > Clean Project) and refresh the linked C++ projects (Build > Refresh Linked C++ Projects).
- You have a supported version
of the Android SDK; see the