프로파일링 가능한 앱 직접 빌드 및 실행
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
프로파일링 가능한 애플리케이션을 직접 빌드하려면 먼저 출시 애플리케이션을 빌드한 다음 매니페스트 파일을 업데이트해야 합니다. 그러면 출시 애플리케이션이 프로파일링 가능한 애플리케이션으로 변환됩니다. 사용자가
프로파일링 가능한 애플리케이션을 구성하고 프로파일러를 실행한 다음
분석할 수 있습니다.
출시 앱 빌드하기
프로파일링 목적으로 출시 애플리케이션을 빌드하려면 다음 단계를 따르세요.
-
애플리케이션의 build.gradle
파일에 다음 라인을 추가하여 애플리케이션을 디버그 키로 서명합니다. 작동하는 출시 빌드 변형이 있다면 다음 단계로 건너뛰어도 됩니다.
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
-
Android 스튜디오에서 Build > Select Build Variant...를 선택하고 출시 변형을 선택합니다.
출시를 프로파일링 가능으로 변경하기
출시 앱을 프로파일링 가능한 앱으로 변환하려면 다음 단계를 따르세요.
-
AndroidManifest.xml
파일을 열고 <application>
내에 다음을 추가합니다. 자세한 내용은 출시를 위한 앱 빌드를 참고하세요.
<profileable android:shell="true"/>
-
SDK 버전에 따라 매니페스트와 관련된 오류가 표시될 수 있음
검증 오류를 해결할 수 없다고 판단되면
다음과 같은 행을 경고로 표시하려면
build.gradle
파일.
aaptOptions {
additionalParameters =["--warn-manifest-validation"]
}
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(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-07-27(UTC)"],[],[],null,["# Build and run a profileable app manually\n\nTo build a [profileable](/studio/profile#requirements) application manually, you\nneed to first build a release application and then update its manifest file,\nwhich turns the release application into a profileable application. After you\nconfigure the profileable application, launch the profiler and select a\nprofileable process to analyze.\n\nBuild a release app\n-------------------\n\nTo build a release application for profiling purposes, do the following:\n\n\u003cbr /\u003e\n\n1. Sign your application with the debug key by adding the following lines to your application's\n `build.gradle` file. If you already have a working release build variant, you can\n skip to the next step.\n\n buildTypes {\n release {\n signingConfig signingConfigs.debug\n }\n }\n \n2. In Android Studio, select **Build** \\\u003e **Select Build Variant...** and choose the\n release variant.\n\n\u003cbr /\u003e\n\nChange release to profileable\n-----------------------------\n\nTo convert your [release app](#build-release-app) to a profileable app, do the\nfollowing:\n\n1. Open the\n `AndroidManifest.xml` file and adding the following within\n `\u003capplication\u003e`. For more details, see\n [Build your app for release](/studio/publish/preparing#publishing-build).\n\n `\u003cprofileable android:shell=\"true\"/\u003e`\n2. Depending on the SDK version, you might see an error related to manifest\n validation; if you can't resolve them and deem it safe to treat the errors\n as warnings, you can do so by adding the following lines to your\n `build.gradle` file.\n\n aaptOptions {\n additionalParameters =[\"--warn-manifest-validation\"]\n }"]]