Build and run a profileable app manually
Stay organized with collections
Save and categorize content based on your preferences.
To build a profileable application manually, you
need to first build a release application and then update its manifest file,
which turns the release application into a profileable application. After you
configure the profileable application, launch the profiler and select a
profileable process to analyze.
Build a release app
To build a release application for profiling purposes, do the following:
-
Sign your application with the debug key by adding the following lines to your application's
build.gradle
file. If you already have a working release build variant, you can
skip to the next step.
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
-
In Android Studio, select Build > Select Build Variant... and choose the
release variant.
Change release to profileable
To convert your release app to a profileable app, do the
following:
-
Open the
AndroidManifest.xml
file and adding the following within
<application>
. For more details, see
Build your app for release.
<profileable android:shell="true"/>
-
Depending on the SDK version, you might see an error related to manifest
validation; if you can't resolve them and deem it safe to treat the errors
as warnings, you can do so by adding the following lines to your
build.gradle
file.
aaptOptions {
additionalParameters =["--warn-manifest-validation"]
}
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-29 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-08-29 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-29 UTC."]]