依赖需加到 app 模块的 build.gradle 而非根目录;默认只解析纯文本、Gzip 和 Brotli,Protobuf 等需自行装解码器;记录内容可能含 Authorization、Cookie 等敏感信息,仅限开发期使用
chucker
ChuckerTeamApache-2.0活跃维护在 Android 设备上直接抓取并查看 OkHttp 的 HTTP 请求与响应,不用连电脑或配代理,调试网络问题很方便。
🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
debugImplementation "com.github.chuckerteam.chucker:library:4.2.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:4.2.0"运行 Android API 21 及以上的设备或模拟器;README 未说明其他硬件要求。
在 Android 设备上直接查看 App 的 HTTP(S) 请求与响应,替代 Charles 抓包
在 Android 设备上直接抓取并查看 OkHttp 的 HTTP 请求与响应,不用连电脑或配代理,调试网络问题很方便。
核心能力
- 以 OkHttp Interceptor 形式记录请求响应并持久化到应用内
- 内置 UI 支持正文搜索高亮与响应图片预览
- 提供 library-no-op 空实现,release 包不留痕迹
- 支持自定义 body 解码器处理 Protobuf 等二进制格式
- 可配置脱敏 Header、保留时长与最大正文长度
容易踩的坑
- 4.3.1Chucker v4.3.1最新正式版2026-02-28 · 2026-02-28 15:39 UTC
Version 4.3.1 (2026-02-28)
Fixed
- Fixed request time, response time, and duration showing default 1970 epoch time when using Cronet with QUIC protocol [#1559]
Dependency Updates
- AGP to 9.0.1
- Kotlin to 2.3.10
- Gradle to 9.3.1
- 4.3.0Chucker v4.3.02026-01-10 · 2026-01-10 23:55 UTC
查看更新说明
Version 4.3.0 (2026-01-10)
Fixed
- Fixed share of
curlwhen URL contains spaces [#1464] - Remove unused wake lock permission (#1498)
Dependency Updates
- Target and Compile SDK to 36
- OkHTTP to 5.3.0
- Kotlin to 2.3.0
- AGP to 8.13.1
- Material to 1.13.0
- Fixed share of
- 4.2.0Chucker v4.2.02025-07-12 · 2025-07-12 21:21 UTC
查看更新说明
Version 4.2.0 (2025-07-12)
Added
- Implement support to select multiple request when exporting or saving them [#1351]
- Better support for Android 15 and Insets [#1347]
- Added Russian translation [#1355]
Fixed
- List and scrollable data does not scroll to above the bottom navigation button bar on Android 15 [#1347]
- Fix
IndexOutOfBoundsExceptionwhen using the search bar in the body of request/responses [#1335] - Fix
PatternSyntaxExceptionwhen typing{in the search bar in the body of request/responses [#1342] - Correctly handle RTL in response view [#1357]
- Fix issue with large base_64 JSON visualization on request/response [#1411]
Dependency Updates
- Kotlin to 2.2.0
- AGP to 8.11.1
- ConstraintLayout to 2.2.1
- Compile SDK to 35
- AppCompat to 1.7.1
New Contributors
- @TWiStErRob made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1327
- @iamarjun made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1335
- @shivanandyadav11 made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1337
- @codedbyaman made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1352
- @Wreos made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1355
- @renovate[bot] made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1364
- @Younes-Charfaoui made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1357
- @SurajBichkunde39 made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1407
- @Khudoyshukur made their first contribution in https://github.com/ChuckerTeam/chucker/pull/1411
Full Changelog: https://github.com/ChuckerTeam/chucker/compare/4.1.0...4.2.0
- 4.1.0Chucker v4.1.02024-12-08 · 2024-12-08 13:59 UTC
查看更新说明
This a new minor release of Chucker. It contains several bugfixes, as well as aligning with Kotlin 2.0.x, Android API level 35 and much more!
Added
- Added copy icon to copy the request/response body on clipboard [#1300]
- Added save as text and save as .har file options to save all transactions [#1214]
- Added
skipPaths(paths Regex),skipDomains(domains Regex)andskipDomains(domains... String)to skip paths/domains from chucker [#1242] - Added spanish translations [#1281]
Fixed
- Fix Toolbar is not accessible on API level 35 [#1280]
- Fix edge-to-edge layout on API level 35 [#1282]
- Fixed activity still asking for notification permission when notifications are disabled [#1165]
- Fixed Gson issue, when using Chucker with ProGuard [#1183]
- Fixed share of
curlwhen header values contain quotes [#1211] - Fix Toolbar subtitle getting truncated on some devices [#1218]
- Fixed the
skipPathsmethod unexpectedly modified the passed arguments [#1237] - Change GSON
TypeTokencreation to allow using Chucker in builds optimized by R8 [#1166] - Fixed bug with scroll to search and navigation bar visibility Fix [#1076]
Depedency Updates
- Kotlin to 2.0.21
- AGP to 8.7.2
- ConstraintLayout to 2.2.0
- Compile SDK to 35
- 4.0.0Chucker v4.0.02023-07-01 · 2023-07-01 17:39 UTC
查看更新说明
We're excited to share a new major release of Chucker: v4.0.0 🎉
This version comes with a lot of new features, and is a major release as we removed the Throwable feature and updated the
ChuckerInterceptorconstructor (see theRemovedsection below).Added
- Add
skipPathsto selectively skip requests from Chucker [#970] - Add syntax highlighting to the request/response body when is JSON [#930]
- Decoding of request and response bodies can now be customized. In order to do this a
BodyDecoderinterface needs to be implemented and installed in theChuckerInterceptorviaChuckerInterceptor.addBinaryDecoder(decoder)method. Decoded bodies are then displayed in the Chucker UI. [#555] - Create dynamic shortcut when
ChuckerInterceptoradded. Users can opt out of this feature usingcreateShortcut(false)inChuckerInterceptor.Builder[#588] - Brotli compression support [#563]
- Added
writeTransactionsmethod toChuckerCollectorto export transactions to a file programmatically [#784] - Added ability to save single transaction as
.harfile. [#696] - Added ability to export list of transactions as
.harfile. [#880] - Added support for Android 13 and notifications permission handling [#887]
- GraphQL
- Add support for GraphQL [#805] [#884]
- Show GraphQL OperationName header to transaction title [#69], [#116]
- Allows to filter transactions based on graphqlOperationName [#920]
- Added scroll to highlighted text search in response screen [#988]
Fixed
- Fixed a bug showing empty bodies as
encoded or binary[#569] [#562] - Fixed DiskReadViolation on ChuckerCollector [#975]
- Fixed request headers not being redacted in case of failures [#545].
- Fixed wrongful processing of one shot and duplex requests [#544].
- Fixed writing to database on the main thread [#487].
- Fixed RTL issue in payload view [#733]
- Fixed StrictMode ThreadPolicy violations [#737]
- Fixed Memory Leak with Toasts: Use applicationContext instead of Activity [#810]
- Improved error message when trying to save empty bodies [#1038]
Removed
- Removed parametrized
ChuckerInterceptorconstructor in favour of builder pattern. Constructor that accepts onlyContextis still available. - Removed the Throwable reporting feature as well as all the @Deprecated related methods.
Changed
- Updated OkHttp to 4.11.0
- Updated Material to 1.8.0
- Updated AGP to 8.0.2
- Updated Kotlin to 1.8.22
Thanks
We would love to thank the whole community for helping us with this release <3 and we want to celebrate new contributors that made their first contribution to chucker in 4.0.0: @4shutosh @Abhishek4uh @Amirhy @andronicus-kim @ArjanSM @BluestormDNA @Canato @Filip2022 @Goooler @gusdantas @handstandsam @jd565 @ken-kentan @mreram @okanaydin @Stuie
Full Changelog: https://github.com/ChuckerTeam/chucker/compare/3.4.0...4.0.0
- Add
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Chucker
A fork of Chuck
Chucker simplifies the inspection of HTTP(S) requests/responses fired by your Android App. Chucker works as an OkHttp Interceptor persisting all those events inside your application, and providing a UI for inspecting and sharing their content.
Apps using Chucker will display a notification showing a summary of ongoing HTTP activity. Tapping on the notification launches the full Chucker UI. Apps can optionally suppress the notification, and launch the Chucker UI directly from within their own interface.
Getting Started 👣
Chucker is distributed through Maven Central. To use it you need to add the following Gradle dependency to the build.gradle file of your android app module (NOT the root file).
Please note that you should add both the library and the library-no-op variant to isolate Chucker from release builds as follows:
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:4.2.0"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:4.2.0"
}
To start using Chucker, just plug in a new ChuckerInterceptor to your OkHttp Client Builder:
val client = OkHttpClient.Builder()
.addInterceptor(ChuckerInterceptor(context))
.build()
That's it! 🎉 Chucker will now record all HTTP interactions made by your OkHttp client.
Tip: Use
addNetworkInterceptor(chuckerInterceptor)instead ofaddInterceptor(chuckerInterceptor)if you want Chucker to display the connected peer IP and everything OkHttp sends on the wire, including headers added by other network interceptors (e.g.Content-Length,Accept-Encoding, cookies fromCookieJar). The connected peer may be a proxy, VPN, CDN edge, or load balancer rather than the origin server. Application interceptors do not have access to the connection and only observe the request as your app builds it. Cached responses do not pass through network interceptors. See OkHttp's Interceptors docs for the full comparison.
Historically, Chucker was distributed through JitPack.
You can find older version of Chucker here: .
Features 🧰
Don't forget to check the changelog to have a look at all the changes in the latest version of Chucker.
- Compatible with OkHTTP 4
- API >= 21 compatible
- Easy to integrate (just 2 gradle
implementationlines). - Works out of the box, no customization needed.
- Empty release artifact 🧼 (no traces of Chucker in your final APK).
- Support for body text search with highlighting 🕵️♂️
- Support for showing images in HTTP Responses 🖼
- Support for custom decoding of HTTP bodies
Multi-Window 🚪
The main Chucker activity is launched in its own task, allowing it to be displayed alongside the host app UI using Android 7.x multi-window support.

Configure 🎨
You can customize chucker providing an instance of a ChuckerCollector:
// Create the Collector
val chuckerCollector = ChuckerCollector(
context = this,
// Toggles visibility of the notification
showNotification = true,
// Allows to customize the retention period of collected data
retentionPeriod = RetentionManager.Period.ONE_HOUR
)
// Create the Interceptor
val chuckerInterceptor = ChuckerInterceptor.Builder(context)
// The previously created Collector
.collector(chuckerCollector)
// The max body content length in bytes, after this responses will be truncated.
.maxContentLength(250_000L)
// List of headers to replace with ** in the Chucker UI
.redactHeaders("Auth-Token", "Bearer")
// Read the whole response body even when the client does not consume the response completely.
// This is useful in case of parsing errors or when the response body
// is closed before being read like in Retrofit with Void and Unit types.
.alwaysReadResponseBody(true)
// Use decoder when processing request and response bodies. When multiple decoders are installed they
// are applied in an order they were added.
.addBodyDecoder(decoder)
// Controls Android shortcut creation.
.createShortcut(true)
.build()
// Don't forget to plug the ChuckerInterceptor inside the OkHttpClient
val client = OkHttpClient.Builder()
.addNetworkInterceptor(chuckerInterceptor)
.build()
Redact-Header 👮♂️
Warning The data generated and stored when using Chucker may contain sensitive information such as Authorization or Cookie headers, and the contents of request and response bodies.
It is intended for use during development, and not in release builds or other production deployments.
You can redact headers that contain sensitive information by calling redactHeader(String) on the ChuckerInterceptor.
interceptor.redactHeader("Auth-Token", "User-Session");
Decode-Body 📖
Chucker by default handles only plain text, Gzip compressed or Brotli compressed. If you use a binary format like, for example, Protobuf or Thrift it won't be automatically handled by Chucker. You can, however, install a custom decoder that is capable of reading data from different encodings.
object ProtoDecoder : BodyDecoder {
fun decodeRequest(request: Request, body: ByteString): String? = if (request.isExpectedProtoRequest) {
decodeProtoBody(body)
} else {
null
}
fun decodeResponse(request: Response, body: ByteString): String? = if (request.isExpectedProtoResponse) {
decodeProtoBody(body)
} else {
null
}
}
interceptorBuilder.addBodyDecoder(ProtoDecoder).build()
Notification Permission 🔔
Starting with Android 13, your apps needs to request the android.permission.POST_NOTIFICATIONS permission to the user in order to show notifications.
As Chucker also shows notifications to show network activity you need to handle permission request depending on your app features.
Without this permission Chucker will track network activity, but there will be no notifications on devices with Android 13 and newer.
There are 2 possible cases:
- If your app is already sending notifications, you don't need to do anything as Chucker will
show a notification as soon as the
android.permission.POST_NOTIFICATIONSpermission is granted to your app. - If your app does not send notifications you would need to open Chucker directly (can be done via shortcut, which is added to your app by default when Chucker is added)
and click
Allowin the dialog with permission request. In case you don't allow this permission or dismiss that dialog by mistake, on every Chucker launch there will be a snackbar with a button to open your app settings where you can change permissions settings. Note, you need to grantandroid.permission.POST_NOTIFICATIONSto your app in Settings as there will be no separate app in Apps list in Settings.
Migrating 🚗
If you're migrating from Chuck to Chucker, please refer to this migration guide.
If you're migrating from Chucker v2.0 to v3.0, please expect multiple breaking changes. You can find documentation on how to update your code on this other migration guide.
Snapshots 📦
Development of Chucker happens in the main branch. Every push to main will trigger a publishing of a SNAPSHOT artifact for the upcoming version. You can get those snapshots artifacts directly from Sonatype with:
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:4.2.0-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:4.2.0-SNAPSHOT"
}
Moreover, you can still use JitPack as it builds every branch. So the top of main is available here:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
debugImplementation "com.github.chuckerteam.chucker:library:main-SNAPSHOT"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:main-SNAPSHOT"
}
⚠️ Please note that the latest snapshot might be unstable. Use it at your own risk ⚠️
If you're looking for the latest stable version, you can always find it in Releases section.
FAQ ❓
- Why are some of my request headers (e.g.
Content-EncodingorAccept-Encoding) missing? - Why are retries and redirects not being captured discretely?
- Why are my encoded request/response bodies not appearing as plain text?
Please refer to this section of the OkHttp documentation. You can choose to use Chucker as either an application or network interceptor, depending on your requirements.
- Why Android < 21 is no longer supported?
In order to keep up with the changes in OkHttp we decided to bump its version in 4.x release. Chucker 3.5.x supports Android 16+ but its active development stopped and only bug fixes and minor improvements will land on 3.x branch till March 2021.
Sponsors 💸
Chucker is maintained and improved during nights, weekends and whenever team has free time. If you use Chucker in your project, please consider sponsoring us. This will help us buy a domain for a website we will have soon and also spend some money on charity. Additionally, sponsorship will also help us understand better how valuable Chucker is for people's everyday work.
You can sponsor us by clicking Sponsor button.
Contributing 🤝
We're offering support for Chucker on the #chucker channel on kotlinlang.slack.com. Come and join the conversation over there.
We're looking for contributors! Don't be shy. 😁 Feel free to open issues/pull requests to help us improve this project.
- When reporting a new Issue, make sure to attach Screenshots, Videos or GIFs of the problem you are reporting.
- When submitting a new PR, make sure tests are all green. Write new tests if necessary.
Short TODO List for new contributors:
- Increment the test coverage.
- Issues marked as
Help wanted
Building 🛠
In order to start working on Chucker, you need to fork the project and open it in Android Studio/IntelliJ IDEA.
Before committing we suggest you install the pre-commit hooks with the following command:
./gradlew installGitHook
This will make sure your code is validated against KtLint and Detekt before every commit.
The command will run automatically before the clean task, so you should have the pre-commit hook installed by then.
Before submitting a PR please run:
./gradlew build
This will build the library and will run all the verification tasks (ktlint, detekt, lint, unit tests) locally. This will make sure your CI checks will pass.
Acknowledgments 🌸
Maintainers
Chucker is currently developed and maintained by the ChuckerTeam. When submitting a new PR, please ping one of:
Thanks
Big thanks to our contributors ❤️
Libraries
Chucker uses the following open source libraries:
License 📄
Copyright (C) 2018-2021 Chucker Team.
Copyright (C) 2017 Jeff Gilfelt.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.