- Syntax:
<profileable android:shell=["true" | "false"] android:enabled=["true" | "false"] />
- enthalten in:
<application>
- description:
- Gibt an, wie Profiler auf diese Anwendung zugreifen können.
- Attribute:
android:shell
-
Gibt an, ob der Nutzer des Geräts ein Profil für diese Anwendung über die lokale Fehlerbehebung erstellen kann
wie die folgenden:
<ph type="x-smartling-placeholder">
- </ph>
android.os.Trace
Tracing APIs (Android 11 und niedriger)simpleperf
am profile
-Befehleperfetto
-Profiler (nativer Arbeitsspeicher, Java-Arbeitsspeicher, CPU)
false
gesetzt ist, funktionieren diese Tools und APIs nur, wenn eine Appdebuggable
Debug-fähige Anwendungen führen zu erheblichen und unterschiedlichen Leistungseinbußen und sind nicht nützlich für wie Sie den zeitlichen Ablauf präzise messen können. Dieses Element wird für die lokale Leistung dringend empfohlen. um genaue Ergebnisse zu erhalten.Dieses Element ist so konzipiert, dass es in Release- oder Produktions-Builds verwendet werden kann, um die lokale Profilerstellung zu ermöglichen. Es besteht ein minimales Risiko einer Datenlecks: Keine Speicherdaten sind von den Host-Profiling-Tools lesbar. und dem Shell-Prozess. Nur Stacktraces sind lesbar, die normalerweise verschleiert sind oder keine Symbole haben in Release-Builds.
android:enabled
-
Gibt an, ob von Systemdiensten oder Shell-Tools Profile für die Anwendung erstellt werden können.
Für Letzteres legen Sie auch
android:shell
fest. Ist er auf „false“ gesetzt, kann kein Profil für die Anwendung erstellt werden. Der Standardwert ist „true“. Dieses Attribut wurde in API-Level 30 hinzugefügt.
- eingeführt in:
- API-Level 29
<profileable>
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-27 (UTC)."],[],[],null,["# <profileable\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cprofileable android:shell=[\"true\" | \"false\"] android:enabled=[\"true\" | \"false\"] /\u003e\n ```\n\ncontained in:\n: [\u003capplication\u003e](/guide/topics/manifest/application-element)\n\ndescription:\n: Specifies how profilers can access this application.\n\nattributes:\n:\n\n `android:shell`\n :\n Specifies whether the user of the device can profile this application through local debugging\n tools such as the following:\n\n - [android.os.Trace](/reference/kotlin/android/os/Trace) tracing APIs (Android 11 and lower)\n - [simpleperf](/ndk/guides/simpleperf)\n - [am profile](/studio/command-line/adb#am) commands\n - [`perfetto` profilers](/studio/command-line/perfetto) (native memory, Java memory, CPU)\n\n\n If this isn't set, or is set to `false`, these tools and APIs work only when an app is\n [debuggable](/guide/topics/manifest/application-element#debug).\n Debuggable apps incur significant and varied performance degradation and aren't useful for\n measuring timing accurately. This element is strongly recommended for local performance\n measurements, to capture accurate results.\n\n This element is designed to be usable in release, or production, builds to enable local profiling.\n It incurs minimal risk of data exposure: no memory data is readable by the host profiling tools\n and the shell process. Only stack traces are readable, which are typically obfuscated or lacking symbols\n in release builds.\n\n:\n\n `android:enabled`\n :\n Specifies whether the application can be profiled by system services or shell tools.\n For the latter, you also set [`android:shell`](#shell).\n If false, the application can't be profiled at all. The default is true.\n\n This attribute was added in API level 30.\n\nintroduced in:\n: API Level 29"]]