{"id":15736,"date":"2025-06-20T21:41:56","date_gmt":"2025-06-20T13:41:56","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736"},"modified":"2025-07-16T11:10:50","modified_gmt":"2025-07-16T03:10:50","slug":"tencent-shadow","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736","title":{"rendered":"Tencent \/ Shadow"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%B8%80%E3%80%81%E5%9F%BA%E6%9C%AC%E4%BB%8B%E7%BB%8D\" title=\"\u4e00\u3001\u57fa\u672c\u4ecb\u7ecd\">\u4e00\u3001\u57fa\u672c\u4ecb\u7ecd<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%BA%8C%E3%80%81%E6%BA%90%E7%A0%81demo%E8%BF%90%E8%A1%8C\" title=\"\u4e8c\u3001\u6e90\u7801demo\u8fd0\u884c\">\u4e8c\u3001\u6e90\u7801demo\u8fd0\u884c<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%B8%89%E3%80%81%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90deepseek\" title=\"\u4e09\u3001\u6e90\u7801\u5206\u6790(deepseek)\">\u4e09\u3001\u6e90\u7801\u5206\u6790(deepseek)<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%B8%80%E3%80%81%E6%BA%90%E7%A0%81%E5%B7%A5%E7%A8%8B%E7%BB%93%E6%9E%84%E5%8F%8A%E4%BD%9C%E7%94%A8\" title=\"\u4e00\u3001\u6e90\u7801\u5de5\u7a0b\u7ed3\u6784\u53ca\u4f5c\u7528\">\u4e00\u3001\u6e90\u7801\u5de5\u7a0b\u7ed3\u6784\u53ca\u4f5c\u7528<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%BA%8C%E3%80%81%E6%A1%86%E6%9E%B6%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86\" title=\"\u4e8c\u3001\u6846\u67b6\u5b9e\u73b0\u539f\u7406\">\u4e8c\u3001\u6846\u67b6\u5b9e\u73b0\u539f\u7406<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#1_%E6%A0%B8%E5%BF%83%E8%AE%BE%E8%AE%A1%E6%80%9D%E6%83%B3\" title=\"1. \u6838\u5fc3\u8bbe\u8ba1\u601d\u60f3\">1. \u6838\u5fc3\u8bbe\u8ba1\u601d\u60f3<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#2_%E5%9B%9B%E5%A4%A7%E7%BB%84%E4%BB%B6%E5%AE%9E%E7%8E%B0%E6%9C%BA%E5%88%B6\" title=\"2. \u56db\u5927\u7ec4\u4ef6\u5b9e\u73b0\u673a\u5236\">2. \u56db\u5927\u7ec4\u4ef6\u5b9e\u73b0\u673a\u5236<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#3_%E7%B1%BB%E5%8A%A0%E8%BD%BD%E4%B8%8E%E8%B5%84%E6%BA%90%E9%9A%94%E7%A6%BB\" title=\"3. \u7c7b\u52a0\u8f7d\u4e0e\u8d44\u6e90\u9694\u79bb\">3. \u7c7b\u52a0\u8f7d\u4e0e\u8d44\u6e90\u9694\u79bb<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#4_%E6%8F%92%E4%BB%B6%E5%8A%A0%E8%BD%BD%E6%B5%81%E7%A8%8B_69\" title=\"4. \u63d2\u4ef6\u52a0\u8f7d\u6d41\u7a0b 69\">4. \u63d2\u4ef6\u52a0\u8f7d\u6d41\u7a0b 69<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#5_%E8%B7%A8%E8%BF%9B%E7%A8%8B%E9%80%9A%E4%BF%A1%EF%BC%88IPC%EF%BC%89\" title=\"5. \u8de8\u8fdb\u7a0b\u901a\u4fe1\uff08IPC\uff09\">5. \u8de8\u8fdb\u7a0b\u901a\u4fe1\uff08IPC\uff09<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E4%B8%89%E3%80%81%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF%E4%BA%AE%E7%82%B9\" title=\"\u4e09\u3001\u6838\u5fc3\u6280\u672f\u4eae\u70b9\">\u4e09\u3001\u6838\u5fc3\u6280\u672f\u4eae\u70b9<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E5%9B%9B%E3%80%81%E5%B1%80%E9%99%90%E6%80%A7%E4%B8%8E%E9%80%82%E7%94%A8%E5%9C%BA%E6%99%AF\" title=\"\u56db\u3001\u5c40\u9650\u6027\u4e0e\u9002\u7528\u573a\u666f\">\u56db\u3001\u5c40\u9650\u6027\u4e0e\u9002\u7528\u573a\u666f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15736\/#%E6%80%BB%E7%BB%93\" title=\"\u603b\u7ed3\">\u603b\u7ed3<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81%E5%9F%BA%E6%9C%AC%E4%BB%8B%E7%BB%8D\"><\/span>\u4e00\u3001\u57fa\u672c\u4ecb\u7ecd<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/cloud.tencent.com\/developer\/article\/2180899?from=15425&amp;policyId=20240000&amp;traceId=01jy6n5rtvtc4bn5k1p01fazt1&amp;frompage=seopage\">https:\/\/cloud.tencent.com\/developer\/article\/2180899?from=15425&policyId=20240000&traceId=01jy6n5rtvtc4bn5k1p01fazt1&frompage=seopage<\/a> \uff08\u57fa\u672c\u4ecb\u7ecd\uff09<br \/>\n<a href=\"https:\/\/www.nowcoder.com\/discuss\/518947418092711936\">https:\/\/www.nowcoder.com\/discuss\/518947418092711936<\/a> \uff08\u6df1\u5ea6\u89e3\u6790\uff09<br \/>\n<a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MzI3NjE2MA==&amp;mid=2650247043&amp;idx=1&amp;sn=bfc5b48b8d7b2f6c764c4e3da1bcd44a&amp;chksm=88637eecbf14f7faa1292daeb13dc858e085f6b4620fd6ac825876d210999186056da9e664ed&amp;scene=27\">https:\/\/mp.weixin.qq.com\/s?__biz=MzA5MzI3NjE2MA==&mid=2650247043&idx=1&sn=bfc5b48b8d7b2f6c764c4e3da1bcd44a&chksm=88637eecbf14f7faa1292daeb13dc858e085f6b4620fd6ac825876d210999186056da9e664ed&scene=27<\/a> \uff08\u90ed\u9716\uff09<\/p>\n<h1><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81%E6%BA%90%E7%A0%81demo%E8%BF%90%E8%A1%8C\"><\/span>\u4e8c\u3001\u6e90\u7801demo\u8fd0\u884c<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<ul>\n<li>\u9047\u5230\u95ee\u98981<\/li>\n<\/ul>\n<pre><code>Tencent \/ Shadow \u9879\u76ee\u5728\u6211\u7684android studio\u73af\u5883\u4e0b\u7f16\u8bd1\u5931\u8d25\uff1a\n\nYour build is currently configured to use incompatible Java 21.0.4 and Gradle 7.5. Cannot sync the project.\n\nWe recommend upgrading to Gradle version 8.9.\n\nThe minimum compatible Gradle version is 8.5.\n\nThe maximum compatible Gradle JVM version is 18.\n\nPossible solutions:\n - Upgrade to Gradle 8.9 and re-sync\n - Upgrade to Gradle 8.5 and re-sync<\/code><\/pre>\n<p>\u4e0a\u9762\u63d0\u793a<code>Your build is currently configured to use incompatible Java 21.0.4 and Gradle 7.5. Cannot sync the project.<\/code>\uff0c\u8bf4\u6211\u7684java\u7248\u672c\u662f21\uff0c\u4e0eGradle\u7248\u672c\u4e0d\u5339\u914d\u3002\u7136\u540e\u6211\u5404\u79cd\u6539\u4ec0\u4e48gradle\uff0ckotlin\u7248\u672c\u4f1a\u5404\u79cd\u62a5\u9519\uff0c\u6700\u540e\u53d1\u73b0\u662fgradle \u9ed8\u8ba4\u4f7f\u7528\u7684sdk\u7248\u672c\u662f21,\u4fee\u6539\u4e00\u4e0bandroid  studio\u7684\u9ed8\u8ba4\u914d\u7f6e\u4e3ajdk17\u5c31\u884c\u4e86\uff1a<br \/>\n<img src=\"http:\/\/xinyiworld.top\/wordpress_it\/wp-content\/uploads\/2025\/06\/jd_version.jpg\" alt=\"\" \/><\/p>\n<h1><span class=\"ez-toc-section\" id=\"%E4%B8%89%E3%80%81%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90deepseek\"><\/span>\u4e09\u3001\u6e90\u7801\u5206\u6790(deepseek)<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81%E6%BA%90%E7%A0%81%E5%B7%A5%E7%A8%8B%E7%BB%93%E6%9E%84%E5%8F%8A%E4%BD%9C%E7%94%A8\"><\/span><strong>\u4e00\u3001\u6e90\u7801\u5de5\u7a0b\u7ed3\u6784\u53ca\u4f5c\u7528<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Shadow\u7684\u4ee3\u7801\u7ec4\u7ec7\u5728<code>projects<\/code>\u76ee\u5f55\u4e0b\uff0c\u5206\u4e3a\u4e09\u4e2a\u6838\u5fc3\u6a21\u5757\uff1a<\/p>\n<ol>\n<li><strong>sdk\uff08\u6846\u67b6\u6838\u5fc3\u5b9e\u73b0\uff09<\/strong> 158\uff1a\n<ul>\n<li><strong>core<\/strong>\uff1a\u5305\u542b\u63d2\u4ef6\u5316\u6838\u5fc3\u903b\u8f91\u3002\n<ul>\n<li><code>loader<\/code>\uff1a\u8d1f\u8d23\u63d2\u4ef6APK\u7684\u52a0\u8f7d\u548c\u7c7b\u7ba1\u7406\u3002<\/li>\n<li><code>runtime<\/code>\uff1a\u5b9e\u73b0\u4ee3\u7406Activity\u3001Service\u7b49\u7ec4\u4ef6\u7684\u8fd0\u884c\u65f6\u903b\u8f91\uff08\u5982<code>ShadowActivity<\/code>\uff09\u3002<\/li>\n<li><code>transform<\/code>\uff1a\u5b57\u8282\u7801\u4fee\u6539\u5de5\u5177\uff0c\u7f16\u8bd1\u671f\u66ff\u6362\u63d2\u4ef6\u7c7b\u7684\u7236\u7c7b\uff08\u5982Activity \u2192 <code>ShadowActivity<\/code>\uff09\u3002<\/li>\n<li><code>manager<\/code>\uff1a\u7ba1\u7406\u63d2\u4ef6\u751f\u547d\u5468\u671f\u548c\u8de8\u8fdb\u7a0b\u901a\u4fe1\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>dynamic<\/strong>\uff1a\u5b9e\u73b0\u6846\u67b6\u81ea\u8eab\u7684\u52a8\u6001\u66f4\u65b0\u80fd\u529b\u3002<\/li>\n<li><strong>gradle-plugin<\/strong>\uff1a\u81ea\u5b9a\u4e49Gradle\u63d2\u4ef6\uff0c\u96c6\u6210\u5b57\u8282\u7801\u4fee\u6539\u5230\u6784\u5efa\u6d41\u7a0b\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>sample\uff08\u793a\u4f8b\u4ee3\u7801\uff09<\/strong> 58\uff1a\n<ul>\n<li><code>sample-host<\/code>\uff1a\u5bbf\u4e3b\u5e94\u7528\uff0c\u8d1f\u8d23\u52a0\u8f7d\u63d2\u4ef6\u3002<\/li>\n<li><code>sample-manager<\/code>\uff1a\u5b9e\u73b0<code>PluginManager<\/code>\uff0c\u7ba1\u7406\u63d2\u4ef6\u5b89\u88c5\u548c\u66f4\u65b0\u3002<\/li>\n<li><code>sample-plugin<\/code>\uff1a\u4e1a\u52a1\u63d2\u4ef6\uff0c\u53ef\u72ec\u7acb\u5b89\u88c5\u8fd0\u884c\u3002<\/li>\n<li><code>sample-constant<\/code>\uff1a\u5b9a\u4e49\u5bbf\u4e3b\u4e0e\u63d2\u4ef6\u901a\u4fe1\u7684\u5e38\u91cf\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>test\uff08\u81ea\u52a8\u5316\u6d4b\u8bd5\uff09<\/strong> 8\uff1a\n<ul>\n<li>\u8986\u76d6\u63d2\u4ef6\u52a0\u8f7d\u3001\u7ec4\u4ef6\u751f\u547d\u5468\u671f\u3001\u8d44\u6e90\u9694\u79bb\u7b49\u573a\u666f\u7684\u6d4b\u8bd5\u7528\u4f8b\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81%E6%A1%86%E6%9E%B6%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86\"><\/span><strong>\u4e8c\u3001\u6846\u67b6\u5b9e\u73b0\u539f\u7406<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"1_%E6%A0%B8%E5%BF%83%E8%AE%BE%E8%AE%A1%E6%80%9D%E6%83%B3\"><\/span><strong>1. \u6838\u5fc3\u8bbe\u8ba1\u601d\u60f3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>\u96f6\u53cd\u5c04\/\u65e0Hook<\/strong>\uff1a\u901a\u8fc7&quot;\u5bbf\u4e3b\u4ee3\u7406&quot;\u66ff\u4ee3\u4f20\u7edfHook\u65b9\u6848\uff0c\u907f\u514d\u53cd\u5c04\u7cfb\u7edf\u79c1\u6709API\uff0c\u517c\u5bb9Android\u9ad8\u7248\u672c\u9650\u52362410\u3002<\/li>\n<li><strong>\u5168\u52a8\u6001\u5316<\/strong>\uff1a\u6846\u67b6\u6838\u5fc3\u903b\u8f91\uff08manager\/runtime\/loader\uff09\u81ea\u8eab\u4f5c\u4e3a\u63d2\u4ef6\u52a8\u6001\u52a0\u8f7d\uff0c\u652f\u6301\u70ed\u66f4\u65b016\u3002<\/li>\n<li><strong>\u5b57\u8282\u7801\u4fee\u6539<\/strong>\uff1a\u7f16\u8bd1\u671f\u4fee\u6539\u63d2\u4ef6\u7c7b\u7ee7\u627f\u5173\u7cfb\uff08\u5982Activity \u2192 <code>ShadowActivity<\/code>\uff09\uff0c\u4f7f\u63d2\u4ef6\u4ee3\u7801\u65e0\u9700\u9002\u914d\u6846\u67b658\u3002<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"2_%E5%9B%9B%E5%A4%A7%E7%BB%84%E4%BB%B6%E5%AE%9E%E7%8E%B0%E6%9C%BA%E5%88%B6\"><\/span><strong>2. \u56db\u5927\u7ec4\u4ef6\u5b9e\u73b0\u673a\u5236<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Activity\u4ee3\u7406\u6a21\u578b<\/strong> 27\uff1a\n<ul>\n<li><strong>\u5bbf\u4e3b\u4fa7<\/strong>\uff1a\u6ce8\u518c<code>PluginContainerActivity<\/code>\uff08\u4ee3\u7406Activity\uff09\uff0c\u901a\u8fc7AndroidManifest\u58f0\u660e\u3002<\/li>\n<li><strong>\u63d2\u4ef6\u4fa7<\/strong>\uff1a\u4e1a\u52a1Activity\u5728\u7f16\u8bd1\u671f\u7236\u7c7b\u88ab\u66ff\u6362\u4e3a<code>ShadowActivity<\/code>\uff08\u975e\u7cfb\u7edfActivity\uff09\u3002<\/li>\n<li><strong>\u751f\u547d\u5468\u671f\u8f6c\u53d1<\/strong>\uff1a<code>PluginContainerActivity<\/code>\u63a5\u6536\u7cfb\u7edf\u56de\u8c03\uff0c\u901a\u8fc7<code>ShadowActivityDelegate<\/code>\u8f6c\u53d1\u7ed9\u63d2\u4ef6Activity\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u5176\u4ed6\u7ec4\u4ef6<\/strong>\uff1aService\/ContentProvider\/Broadcast\u91c7\u7528\u7c7b\u4f3c\u4ee3\u7406\u673a\u5236\uff0c\u901a\u8fc7<code>PluginContainerService<\/code>\u7b49\u7ec4\u4ef6\u4e2d\u8f6c49\u3002<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"3_%E7%B1%BB%E5%8A%A0%E8%BD%BD%E4%B8%8E%E8%B5%84%E6%BA%90%E9%9A%94%E7%A6%BB\"><\/span><strong>3. \u7c7b\u52a0\u8f7d\u4e0e\u8d44\u6e90\u9694\u79bb<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\n<p><strong>\u53cc\u4eb2\u59d4\u6d3e\u6539\u9020<\/strong> 13\uff1a<\/p>\n<ul>\n<li><code>ApkClassLoader<\/code>\u901a\u8fc7\u767d\u540d\u5355\u63a7\u5236\u7c7b\u52a0\u8f7d\u4f18\u5148\u7ea7\uff1a<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\"><strong>\u573a\u666f<\/strong><\/th>\n<th style=\"text-align: left;\"><strong>\u52a0\u8f7d\u7b56\u7565<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">\u767d\u540d\u5355\u4e2d\u7684\u7c7b\uff08\u5982\u5bbf\u4e3b\u63a5\u53e3\uff09<\/td>\n<td style=\"text-align: left;\">\u53cc\u4eb2\u59d4\u6d3e\uff08\u4f18\u5148\u5bbf\u4e3bClassLoader\uff09<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">\u975e\u767d\u540d\u5355\u7c7b<\/td>\n<td style=\"text-align: left;\">\u4f18\u5148\u63d2\u4ef6\u81ea\u8eabClassLoader\uff0c\u5931\u8d25\u65f6\u59d4\u6d3e\u5bbf\u4e3b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p><strong>\u8d44\u6e90\u9694\u79bb<\/strong> 19\uff1a<\/p>\n<ul>\n<li>\u901a\u8fc7<code>ChangeApkContextWrapper<\/code>\u521b\u5efa\u63d2\u4ef6\u72ec\u7acb<code>Resources<\/code>\u5bf9\u8c61\u3002<\/li>\n<li>\u4fee\u6539<code>AssetManager<\/code>\u7684\u52a0\u8f7d\u8def\u5f84\u6307\u5411\u63d2\u4ef6APK\uff0c\u907f\u514d\u8d44\u6e90ID\u51b2\u7a81\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"4_%E6%8F%92%E4%BB%B6%E5%8A%A0%E8%BD%BD%E6%B5%81%E7%A8%8B_69\"><\/span><strong>4. \u63d2\u4ef6\u52a0\u8f7d\u6d41\u7a0b<\/strong> 69<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>\u5bbf\u4e3b\u521d\u59cb\u5316<\/strong>\uff1a\n<ul>\n<li>\u590d\u5236Manager\u63d2\u4ef6\uff08manager.apk\uff09\u5230\u672c\u5730\uff0c\u52a0\u8f7d<code>PluginManager<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u52a8\u6001\u52a0\u8f7dRuntime\/Loader<\/strong>\uff1a\n<ul>\n<li>Manager\u63d2\u4ef6\u901a\u8fc7Binder\u8de8\u8fdb\u7a0b\u52a0\u8f7dRuntime\uff08\u4ee3\u7406\u903b\u8f91\uff09\u548cLoader\uff08\u7c7b\u52a0\u8f7d\u5668\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u542f\u52a8\u4e1a\u52a1\u63d2\u4ef6<\/strong>\uff1a\n<ul>\n<li>Loader\u89e3\u6790\u63d2\u4ef6APK\uff0c\u521b\u5efa<code>ShadowApplication<\/code>\u3002<\/li>\n<li>\u901a\u8fc7<code>PluginContainerActivity<\/code>\u542f\u52a8\u76ee\u6807\u63d2\u4ef6Activity\uff08\u5b9e\u4e3a\u4ee3\u7406\u8f6c\u53d1\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"5_%E8%B7%A8%E8%BF%9B%E7%A8%8B%E9%80%9A%E4%BF%A1%EF%BC%88IPC%EF%BC%89\"><\/span><strong>5. \u8de8\u8fdb\u7a0b\u901a\u4fe1\uff08IPC\uff09<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Binder\u5206\u5c42\u67b6\u6784<\/strong> 69\uff1a\n<ul>\n<li>\u5bbf\u4e3b\u8fdb\u7a0b \u2194 <code>PluginProcessService<\/code>\uff08\u63d2\u4ef6\u8fdb\u7a0b\uff09\u901a\u8fc7<code>PpsController<\/code>\u63a5\u53e3\u901a\u4fe1\u3002<\/li>\n<li>\u5173\u952e\u5bf9\u8c61\uff08\u5982<code>PluginLoaderImpl<\/code>\uff09\u901a\u8fc7Binder\u8de8\u8fdb\u7a0b\u4f20\u9012\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%89%E3%80%81%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF%E4%BA%AE%E7%82%B9\"><\/span><strong>\u4e09\u3001\u6838\u5fc3\u6280\u672f\u4eae\u70b9<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>\u5b57\u8282\u7801\u4fee\u6539\uff08Transform\uff09<\/strong> 58\uff1a\n<ul>\n<li>\u4f7f\u7528<code>ShadowTransform<\/code>\u5728\u7f16\u8bd1\u671f\u4fee\u6539\u63d2\u4ef6\u5b57\u8282\u7801\uff0c\u66ff\u6362\u7236\u7c7b\uff08\u5982Activity \u2192 <code>ShadowActivity<\/code>\uff09\u3001\u4fee\u590d\u4e0a\u4e0b\u6587\u5f15\u7528\uff08\u5982<code>getActivity()<\/code>\uff09\u3002<\/li>\n<li>\u5de5\u5177\uff1a\u57fa\u4e8eASM\/Javassist\uff0c\u96c6\u6210\u81f3Gradle Plugin\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u52a8\u6001\u6846\u67b6\u66f4\u65b0<\/strong> 610\uff1a\n<ul>\n<li>Manager\/Runtime\/Loader\u4f5c\u4e3a\u72ec\u7acb\u63d2\u4ef6\u53d1\u5e03\uff0c\u5bbf\u4e3b\u65e0\u9700\u5347\u7ea7\u5373\u53ef\u66f4\u65b0\u6846\u67b6\u903b\u8f91\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u8f7b\u91cf\u5316\u5bbf\u4e3b<\/strong>\uff1a\n<ul>\n<li>\u5bbf\u4e3b\u4ec5\u4fdd\u755915KB\u6838\u5fc3\u4ee3\u7801\uff08\u901a\u4fe1+\u4ee3\u7406\uff09\uff0c\u4e1a\u52a1\u903b\u8f91\u5168\u52a8\u6001\u52a0\u8f7d14\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u517c\u5bb9\u6027\u4fdd\u969c<\/strong>\uff1a\n<ul>\n<li>\u4e25\u683c\u6a21\u5f0f\uff08<code>StrictMode<\/code>\uff09\u4e0b\u65e0\u975e\u6cd5API\u8c03\u7528\uff0c\u901a\u8fc7Android 9+\u9650\u523610\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9B%9B%E3%80%81%E5%B1%80%E9%99%90%E6%80%A7%E4%B8%8E%E9%80%82%E7%94%A8%E5%9C%BA%E6%99%AF\"><\/span><strong>\u56db\u3001\u5c40\u9650\u6027\u4e0e\u9002\u7528\u573a\u666f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>\u5c40\u9650\u6027<\/strong> 14\uff1a\n<ul>\n<li>\u63a5\u5165\u590d\u6742\uff1a\u9700\u81ea\u5b9a\u4e49Gradle\u63d2\u4ef6\uff0c\u8c03\u8bd5\u96be\u5ea6\u9ad8\u3002<\/li>\n<li>\u591a\u8fdb\u7a0b\u9650\u5236\uff1a\u63d2\u4ef6\u4e0e\u5bbf\u4e3b\u73af\u5883\u9694\u79bb\uff0c\u8de8\u8fdb\u7a0b\u901a\u4fe1\u9700\u663e\u5f0f\u8bbe\u8ba1\u3002<\/li>\n<li>\u793e\u533a\u7ef4\u62a4\u5f31\uff1a\u5b98\u65b9\u5df2\u6682\u505c\u8fed\u4ee3\uff0c\u9700\u81ea\u884c\u9002\u914d\u65b0\u9700\u6c42\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\n<ul>\n<li>\u5927\u578b\u5e94\u7528\uff08\u5982\u5fae\u4fe1\uff09\uff1a\u6a21\u5757\u52a8\u6001\u66f4\u65b0\u3001\u5bbf\u4e3b\u8f7b\u91cf\u5316\u3002<\/li>\n<li>\u9ad8\u517c\u5bb9\u6027\u9700\u6c42\uff1a\u907f\u514d\u53cd\u5c04\u79c1\u6709API\uff0c\u9002\u914dAndroid\u65b0\u7248\u672c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E6%80%BB%E7%BB%93\"><\/span><strong>\u603b\u7ed3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Shadow\u901a\u8fc7<strong>\u5bbf\u4e3b\u4ee3\u7406\u6a21\u578b<\/strong> + <strong>\u5b57\u8282\u7801\u4fee\u6539<\/strong> + <strong>\u52a8\u6001\u6846\u67b6\u52a0\u8f7d<\/strong>\u4e09\u91cd\u6280\u672f\uff0c\u5b9e\u73b0\u4e86\u96f6\u53cd\u5c04\u7684\u63d2\u4ef6\u5316\u65b9\u6848\u3002\u5176\u5de5\u7a0b\u7ed3\u6784\u5206\u5c42\u660e\u786e\uff08sdk\/sample\/test\uff09\uff0c\u6838\u5fc3\u4ef7\u503c\u5728\u4e8e<strong>\u5168\u52a8\u6001\u80fd\u529b<\/strong>\u548c<strong>\u7cfb\u7edf\u517c\u5bb9\u6027<\/strong>\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f83\u9ad8\u7684\u63a5\u5165\u590d\u6742\u5ea6\u3002\u5bf9\u4e8e\u6df1\u5ea6\u63d2\u4ef6\u5316\u9700\u6c42\uff0cShadow\u4ecd\u662f\u5de5\u4e1a\u7ea7\u4f18\u9009\uff0c\u5c24\u5176\u9002\u5408\u9700\u8981\u957f\u671f\u517c\u5bb9Android\u65b0\u7248\u672c\u7684\u8d85\u7ea7APP\u573a\u666f\u3002<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"15736\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u4e00\u3001\u57fa\u672c\u4ecb\u7ecd\u4e8c\u3001\u6e90\u7801demo\u8fd0\u884c\u4e09\u3001\u6e90\u7801\u5206\u6790(deepseek)\u4e00\u3001\u6e90\u7801\u5de5\u7a0b\u7ed3\u6784\u53ca\u4f5c\u7528\u4e8c\u3001\u6846\u67b6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[122],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15736"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15736"}],"version-history":[{"count":5,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15736\/revisions"}],"predecessor-version":[{"id":15755,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15736\/revisions\/15755"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15736"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}