스택 트레이스 줄을 파싱하기 위한 기본 정규 표현식을 덮어씁니다.
예를 들어 다음은 기본 스택 트레이스를 파싱할 수 있는 정규식입니다.
(?:.*? at %c\.%m\(%s(?::%l)?\))|(?:(?:.*?[:"] +)?%c(?::.*)?).
사용 참고사항
R8 retrace는 생성된 매핑 파일을 사용하여 난독화된 클래스 및 메서드 이름을 원래 정의에 다시 매핑합니다. 올바르게 다시 추적할 수 있도록 앱을 축소하는 방법에 관한 자세한 내용은 난독화된 스택 트레이스 디코딩을 참고하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# R8 retrace is a tool for obtaining the original stack trace from an obfuscated\nstack trace. The stack trace is reconstructed by matching class and method names\nin a mapping file to their original definitions.\n| **Note:** R8 retrace is a standalone tool in version 4.0 of the command-line tools package, released with Android Studio 4.2.\n|\n| To download the command-line tools package with the SDK Manager, see\n| [Update your tools with the\n| SDK Manager](/studio/intro/update#sdk-manager). The SDK Manager installs R8 retrace in\n| `cmdline-tools/`\u003cvar translate=\"no\"\u003eversion\u003c/var\u003e`/bin/`.\n|\n| To download the command-line tools package using the command line, see\n| [`sdkmanager`](/studio/command-line/sdkmanager).\n\nUsage\n-----\n\nTo retrace an obfuscated stack trace, pass the mapping file to `retrace`: \n\n retrace \u003cvar translate=\"no\"\u003e path-to-mapping-file [path-to-stack-trace-file] [options] \u003c/var\u003e\n\nIf no stack trace file is given on the command line, R8 retrace waits for\nthe stack trace to be entered by the user through standard input. After input,\nterminate the input stream:\n\n- **Linux, macOS:** Control+D\n- **Windows:** Control+Z+Enter\n\nThe retraced output is then written to standard output.\n\nOptions\n-------\n\nThe following table describes the command-line options of R8 retrace:\n\n| Option | Required? | Description |\n|---------------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `--verbose` | no | Prints more information, such as method parameters and method return type. |\n| `--info` | no | Sets the diagnostic level to `info`. For a more in-depth look, refer to [DiagnosticsHandler](https://r8.googlesource.com/r8/+/refs/heads/main/src/main/java/com/android/tools/r8/DiagnosticsHandler.java). |\n| `--quiet` | no | Reduces the amount of information printed to increase focus. |\n| `--regex `\u003cvar translate=\"no\"\u003e<regular_exp>\u003c/var\u003e | no | Overwrites the default regular expression for parsing stack trace lines. For example, the following is a regex that can parse basic stack traces: `(?:.*? at %c\\.%m\\(%s(?::%l)?\\))|(?:(?:.*?[:\"] +)?%c(?::.*)?)`. |\n\nUsage notes\n-----------\n\nR8 retrace uses a generated mapping file for mapping obfuscated class and\nmethod names back to the original definition. For more information about\nshrinking your app so that it can be retraced correctly, see\n[Decode an obfuscated stack trace](/studio/build/shrink-code#decode-stack-trace)."]]