{"id":13428793,"url":"https://github.com/feelschaotic/SDKHotFix","last_synced_at":"2025-03-16T02:30:36.426Z","repository":{"id":50442311,"uuid":"196667580","full_name":"feelschaotic/SDKHotFix","owner":"feelschaotic","description":"在用户规模千万级别的app中验证过，稳定无兼容问题，5分钟让你的SDK拥有热修复能力。A SDK hotfix library with stable verified in tens of millions of users can be accessed in only five minutes. ","archived":false,"fork":false,"pushed_at":"2021-03-21T13:15:09.000Z","size":35010,"stargazers_count":640,"open_issues_count":0,"forks_count":84,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-09T19:32:26.675Z","etag":null,"topics":["android-library","gradle-plugin","hotfix","library","robust","sdk"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feelschaotic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-13T02:08:43.000Z","updated_at":"2025-01-02T09:25:04.000Z","dependencies_parsed_at":"2022-09-24T07:41:21.739Z","dependency_job_id":null,"html_url":"https://github.com/feelschaotic/SDKHotFix","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feelschaotic%2FSDKHotFix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feelschaotic%2FSDKHotFix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feelschaotic%2FSDKHotFix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feelschaotic%2FSDKHotFix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feelschaotic","download_url":"https://codeload.github.com/feelschaotic/SDKHotFix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538139,"owners_count":20307104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-library","gradle-plugin","hotfix","library","robust","sdk"],"created_at":"2024-07-31T01:01:05.274Z","updated_at":"2025-03-16T02:30:36.374Z","avatar_url":"https://github.com/feelschaotic.png","language":"Kotlin","readme":"# SDKHotFix\n\n![](https://s2.ax1x.com/2019/10/19/KmuXbF.md.png)\n\n[![Download](https://img.shields.io/badge/SDKHotFix-version%3A1.12-green)](https://github.com/feelschaotic/SDKHotFix/releases)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/feelschaotic/SDKHotFix/pulls)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)  \n\n在用户规模千万级别的app中验证过，稳定、无兼容问题，5分钟即可接入，满足你的SDK快速拥有热修复能力的需求。\n\n\n\n---\n## 目录\n\n- 一、介绍\n  * 作用\n  * 优点\n  * 待改进\n- 二、接入指南\n- 三、使用指南和演示\n- 四、原理\n- 五、相关文章\n- 六、改进说明\n    \n[查看演示 Demo](https://github.com/feelschaotic/SDKHotFix/tree/master/business_sdk) | [文档](https://github.com/feelschaotic/SDKHotFix/wiki)\n\n\n## 一、介绍\n\n相信 APP 热修复大家都很熟练了，那如果 SDK 想要实现热修复呢？\n\n这就是本项目诞生的背景，让 SDK 开发者能快速赋予 SDK 热修复的能力，不要踩我踩过的坑。（捂脸哭）\n\n### 作用\n\n如果你是 SDK 开发者，你能得到什么？\n- 5 分钟即可让你的 SDK 拥有热修复的能力\n- 节省踩坑和开发成本\n\n如果你是一个学习者，你能通过这个项目学到什么？\n- hook and create Gradle Task\n- Kotlin + groovy\n- 热修复\n- 非对称加密+对称加密\n- 扩展美团 Robust 开源库，使其具有其他热更库不具备的补丁回滚功能\n- 数据和监控思维\n\n### 优点\n\n1. 无兼容问题\n2. 实时生效\n3. 修复成功率高达99.9%\n4. 在用户规模千万级别的app中验证过，可信赖\n5. 支持补丁异常自动失效，不用再担心补丁造成crash啦~\n\n### 待改进\n\n1. 在编译阶段插件侵入了产品代码，对运行效率、方法数、包体积还是产生了一些副作用。（可指定某些class无需插入方法，减少插桩数）\n2. so和资源的替换目前暂未实现 \n3. 对于只有字段访问的函数无法直接修复，可通过调用处间接修复\n4. 上传GradleTask尚未在MAC环境下测试\n5. 上传的补丁支持按包名存档\n6. 要商用的小伙伴要注意，建议换成自己的后端接口或自己续费一个bmob应用，因为bmob云函数服务超过40天需要收费，所以本项目需要定期更新应用秘钥。\n\n## 二、接入指南 \n\n点击[SDK热修复SDK接入文档](https://github.com/feelschaotic/SDKHotFix/wiki/SDK%E7%83%AD%E4%BF%AE%E5%A4%8DSDK%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)，开始接入吧！\n\n关于常见问题的解决，请参看 [Wiki](https://github.com/feelschaotic/SDKHotFix/wiki)\n\n## 三、使用指南和演示\n\n- [SDK热修复SDK接入文档](https://github.com/feelschaotic/SDKHotFix/wiki/SDK%E7%83%AD%E4%BF%AE%E5%A4%8DSDK%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3)\n\u003e 用于业务SDK接入\n\n- [SDK热修复使用文档](https://github.com/feelschaotic/SDKHotFix/wiki/SDK%E7%83%AD%E4%BF%AE%E5%A4%8D%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3)\n\u003e 用于接入后SDK的打包、补丁代码的编写、下发、上传。\n\n- [SDK热修复使用常见问题](https://github.com/feelschaotic/SDKHotFix/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E4%B8%8E%E5%BC%82%E5%B8%B8%E8%87%AA%E6%9F%A5)\n\u003e 常见问题和异常汇总，遇到问题前请先自查\n\n![](https://github.com/feelschaotic/SDKHotFix/blob/master/gif/%E6%BC%94%E7%A4%BAdemo%E5%B9%B6%E7%BC%96%E5%86%99%E8%A1%A5%E4%B8%81.gif)\n\n\u003e Module说明：\n\u003e - SDKHotFix\\APP：调试HotfixSDK用\n\u003e - SDKHotFix\\buildSrc：upload补丁用\n\u003e - SDKHotFix\\SDK：赋予业务SDK热修复能力的SDK\n\u003e - SDKHotFix\\business_sdk\\APP：模拟业务app接入了有热修复能力的业务SDK，上述gif的演示效果即是本示例\n\u003e - SDKHotFix\\business_sdk\\samplesdk：模拟业务SDK如何接入SDKHotFix，上述gif的演示效果即是本示例\n## 四、原理\n\n- [如何5分钟让你的 SDK 拥有热修复能力（原理篇）](https://juejin.im/post/5da546b35188254796426ae3)\n\n## 五、相关文章\n\n- [APP 热修复都懂了，你会 SDK 热修复吗？最全方案在这里！](https://juejin.im/post/5d299aaae51d45105e021367)\n\n## 六、改进说明\n\n1. 稳定性提升：\n- fix 若干 bug\n- fix 与业务方的资源 ID 冲突问题\n2. 便捷性提高：\n- 使用 gardle Task 脚本上传补丁，比起 Window 程序更方便\n- 抽取成库，业务 SDK 只需要最小步骤即可快速接入\n3. 支持度提高：\n- 使用了阿里云 oss 管理补丁 \n- 支持了打包 SDK 后上传 jcenter\n\n\n\n","funding_links":[],"categories":["Libraries","Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeelschaotic%2FSDKHotFix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeelschaotic%2FSDKHotFix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeelschaotic%2FSDKHotFix/lists"}