샘플 APK가 대상 기기에 빌드되고 설치되어야 합니다. 오류가 발생하면 다음을 확인하세요.
지원되는 버전의 Android SDK가 있어야 합니다. 자세한 내용은 앱 모듈 build.gradle 파일의 compileSdkVersion 필드를 참고하세요. SDK Manager의 SDK Platforms 탭에서 SDK 버전을 업데이트할 수 있습니다.
지원되는 버전의 Android NDK가 있어야 합니다. 자세한 내용은 앱 모듈 build.gradle 파일의 ndkVersion 필드를 참고하세요. SDK Manager의 SDK Tools 탭에서 특정 버전의 NDK를 설치할 수 있습니다.
프로젝트의 local.properties 파일에 ndk.dir에 관한 항목이 없습니다. 이 위치는 Android 스튜디오에서 지정하며 위의 NDK 버전을 사용합니다. 이 항목이 있다면 줄 전체를 지웁니다.
빌드 설정 변경 후 프로젝트를 정리하고(Build > Clean Project) 연결된 C++ 프로젝트를 새로고칩니다(Build > Refresh Linked C++ Projects).
모니터링 앱 실행
데모 앱 또는 기타 Tuning Fork 지원 앱의 디버그 빌드를 사용하면 Google Play 서버가 아닌 로컬 엔드포인트에서 데이터를 보내고 받도록 앱을 구성할 수 있습니다. 이렇게 하려면 다음과 같이 Tuning Fork 설정에서 endpoint_uri_override를 설정합니다.
Google Play Console에서 데모 앱을 위한 새 애플리케이션을 만듭니다. 자세한 내용은 앱 업로드를 참고하세요.
출시 APK를 내부 테스트 트랙에 업로드합니다. 자세한 내용은 버전 준비 및 출시를 참고하세요.
출시 빌드 실행
대상 기기를 선택하고 Run을 클릭합니다.
Google Play Console에 업로드한 것과 동일한 출시 APK를 사용해야 합니다.
데모 앱을 잠시 동안 실행합니다. Google Play Console이 데이터 표시를 시작하는 데 최대 30분이 걸릴 수 있습니다. Logcat 창에서 Info 로그 수준을 선택하여 데이터가 서버에 업로드되고 있는지 확인합니다. 로그에 오류가 표시되면 일반적인 오류 문제 해결을 참고하세요.
... I/TuningFork:Web: Connecting to:
https://performanceparameters.googleapis.com/v1/applications/com.tuningfork.yourapp/apks/24:uploadTelemetry
... I/TuningFork: Scene loading 30 (true) took 166 ms
... I/TuningFork:Web: Response code: 200
... I/TuningFork:Web: Response message: OK
... I/TuningFork.GE: UPLOAD request returned 200 {}
Google Play Console에서 그래프 확인
Google Play Console을 열고 테스트 애플리케이션을 선택합니다. Android Vitals > 성능 > 통계를 선택하여 프레임 시간 그래프를 확인합니다.
그림 4. Android vitals 그래프
Tuning Fork 라이브러리를 사용하여 엔드 투 엔드 테스트를 성공적으로 실행했습니다. 테스트 앱 프로젝트는 더 이상 필요하지 않으므로 Google Play Console에서 삭제할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-26(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-26(UTC)"],[],[],null,["This page describes how to run an end-to-end test using a demo app and the\nGoogle Play Console.\n\nSteps\n\nTo download the SDK, run the demo app, verify the app is working correctly, and\nview frame timing information from the app in the Google Play Console, do the\nfollowing:\n\n1. Clone the main branch of the [Android Open Source Project](https://android.googlesource.com/platform/frameworks/opt/gamesdk/) Games SDK Repository.\n2. Build and run the demo app.\n3. Run the monitor app.\n4. Create a release build.\n5. Run the release build.\n6. View the graphs in the Google Play Console.\n\nBuild and run the demo app\n\nRun the APT Insights Demo app in Android Studio to make sure everything\nbuilds correctly. This project uses CMake for native code building and shows how\nto use the `gamesdk.cmake` file, which is the easiest way to get started.\n\nTo run the demo app, do the following:\n\n1. Open Android Studio.\n2. Click **File \\\u003e Open** and select `gamesdk/samples/tuningfork/insightsdemo/build.gradle`.\n3. Wait for Android Studio to sync the project.\n4. Connect a device (or [create a virtual device](/studio/run/managing-avds)) to run the sample. Enable [developer options and USB debugging](/studio/debug/dev-options#enable) on the device.\n5. Select the target device and click **Run**\n .\n For more information, see [Build and run your app](/studio/run).\n\n **Figure 1.** Test app running successfully\n6. The sample APK should build and install on the target device. If you\n encounter errors, check the following:\n\n - You have a [supported version](/games/sdk#requirements) of the Android SDK; see the `compileSdkVersion` field in the app module `build.gradle` file for more information. You can [update the SDK version](/studio/intro/update#sdk-manager) from the **SDK Platforms** tab in the SDK Manager.\n - You have a [supported version](/games/sdk#requirements) of the Android NDK; see the `ndkVersion` field in the app module `build.gradle` file for more information. You can [install a specific version of the NDK](/studio/projects/install-ndk#specific-version) from the **SDK Tools** tab in the SDK Manager.\n - The `local.properties` file in the project does *not* have an entry for `ndk.dir`. This location is specified by Android Studio and uses the NDK version from above. If you have this entry, clear the entire line.\n - After any build setting change, clean the project (**Build \\\u003e Clean\n Project** ) and refresh the linked C++ projects (**Build \\\u003e Refresh Linked\n C++ Projects**).\n\nRun the monitor app\n\nWith a debug build of the demo app or any other Tuning Fork-enabled app,\nyou can configure the app to send and receive data from a local endpoint rather\nthan the Google Play server. To do this, set the `endpoint_uri_override` in\nthe Tuning Fork settings: \n\n #ifndef NDEBUG\n settings.endpoint_uri_override = \"http://localhost:9000\";\n #endif\n\nYou must also include the following permissions in the `AndroidManifest.xml`\nfile: \n\n \u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n \u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n\nThe demo app already has these changes (see [`insightsdemo.cpp`](https://android.googlesource.com/platform/frameworks/opt/gamesdk/+/refs/heads/master/samples/tuningfork/insightsdemo/app/src/main/cpp/insightsdemo.cpp)).\n\nYou can use this feature to verify that an app is sending and receiving the\nproper data. To verify this, run the demo app and the Tuning Fork Monitor app at\nthe same time. This monitoring app acts as a local server and displays the data\nthat a Tuning Fork-enabled app produces.\n\nTo run the monitoring app and demo app at the same time to verify that the demo\napp is working properly, do the following:\n\n1. Install the Tuning Fork Monitor app APK on the target device using [adb](/studio/command-line/adb): \n\n ```\n adb install gamesdk/gamesdk/apks/tools/TuningForkMonitor.apk\n ```\n2. Open the monitoring app.\n3. Press the Android Home button to send the Tuning Fork Monitor app to the background on the device.\n4. [Run the demo app](#run-demo-app) again in the foreground for about 30 seconds.\n5. Switch back to the Tuning Fork Monitor app.\n6. The demo app appears under **Live Applications** as `com.tuningfork.insightsdemo 16`. Tap this entry to see app details and live telemetry.\n\n**Figure 2.** The monitor app detects the demo app \n**Figure 3.** The monitor app displays data from the demo app\n\nCreate a release build\n\nCreate a release build of the demo app in Android Studio. You upload this build\nto the Google Play Console to enable frame timing graphs in Android Vitals.\n\n1. [Enable the Android Performance Parameters API](/games/sdk/performance-tuner/custom-engine/enable-api)\n in Google Cloud Console. This API enables the app to communicate with\n Google Play. You don't need to restrict the API key for the demo app.\n\n2. Make sure to copy your API key from the previous step into the `api_key`\n field in\n `gamesdk/samples/tuningfork/insightsdemo/app/src/main/assets/tuningfork/tuningfork_settings.txt`.\n\n3. The demo app's application ID is reserved, so can't upload an APK that uses\n it. Change this ID in the app's `build.gradle` file:\n\n ```\n applicationId \"com.tuningfork.your-unique-identifier\"\n ```\n4. Clean the project (**Build \\\u003e Clean Project** ) and refresh the linked C++\n projects (**Build \\\u003e Refresh Linked C++ Projects**).\n\n5. Create a signing configuration for release builds.\n\n 1. Select **File \\\u003e Project Structure \\\u003e Modules**.\n 2. Select the **Signing Configs** tab.\n 3. Add a new configuration named `release`.\n 4. [Create a keystore](/studio/publish/app-signing#generate-key) for the configuration.\n6. Associate the release signing configuration with the release build variant.\n\n 1. Select **File \\\u003e Project Structure \\\u003e Build Variants**.\n 2. Select the **Build Types** tab.\n 3. Select the build type named `release`.\n 4. In the **Signing Config** box, select the release configuration variable.\n7. In the Android Studio project window, select the **app** directory. (This\n selection enables the menu selection in the next step.)\n\n8. Change the active build variant to `release` (**Build \\\u003e Select Build\n Variant**).\n\n9. Select **Build \\\u003e Build Bundles(s)/APK(s) \\\u003e Build APK(s)** . When the build\n completes, click the **locate** link to find the release APK.\n\n10. Create a new application for the demo app in the Google Play Console. For\n more information, see\n [Upload an app](https://support.google.com/googleplay/android-developer/answer/113469).\n\n11. Upload the release APK to the **Internal test track** . For more information,\n see\n [Prepare \\& roll out releases](https://support.google.com/googleplay/android-developer/answer/7159011).\n\n | **Note:** You must upload the APK to an internal test track on Google Play. If you do not, privacy filters block the associated graph from appearing.\n\nRun the release build\n\nSelect the target device and click **Run**\n.\nYou must use the same release APK that you uploaded to the\nGoogle Play Console.\n\nLet the demo app run for awhile. It can take up to 30 minutes for the Google\nPlay Console to start displaying data. Verify that data is uploading to the\nserver by selecting the **Info** log level in the **Logcat** window. If you see\nerrors in the log, see\n[Troubleshoot common errors](/games/sdk/performance-tuner/custom-engine/troubleshooting). \n\n ... I/TuningFork:Web: Connecting to:\n https://performanceparameters.googleapis.com/v1/applications/com.tuningfork.yourapp/apks/24:uploadTelemetry\n ... I/TuningFork: Scene loading 30 (true) took 166 ms\n ... I/TuningFork:Web: Response code: 200\n ... I/TuningFork:Web: Response message: OK\n ... I/TuningFork.GE: UPLOAD request returned 200 {}\n\n| **Note:** Make sure to run the release build variant or else data won't upload to the Google Play Console.\n\nView the graphs in the Google Play Console\n\nOpen the Google Play Console and select the test application. Select **Android\nVitals \\\u003e Performance \\\u003e Insights** to see the frame time graph.\n\n\n**Figure 4.** Android vitals graph\n\nYou have successfully run an end-to-end test with the Tuning Fork\nlibrary. You can delete the test app project in the Google Play Console, as it\nis no longer needed."]]