{"id":299,"date":"2022-02-23T10:05:36","date_gmt":"2022-02-23T02:05:36","guid":{"rendered":"https:\/\/blog.iichen.cn\/?p=299"},"modified":"2022-02-23T10:05:36","modified_gmt":"2022-02-23T02:05:36","slug":"android-%e7%83%ad%e4%bf%ae%e5%a4%8d%e4%b9%8bthinker","status":"publish","type":"post","link":"https:\/\/iichen.cn\/?p=299","title":{"rendered":"Android-\u70ed\u4fee\u590d\u4e4bThinker"},"content":{"rendered":"<h4>\u4e00\u3001\u5f00\u59cb\u914d\u7f6e<\/h4>\n<blockquote><p>\n  \u9879\u76eebuild.gradle\u914d\u7f6e\n<\/p><\/blockquote>\n<pre><code class=\"language-groovy line-numbers\">dependencies {\n        \/\/ \u6682\u65f6\u4e0d\u80fd\u8d85\u8fc74.0.0\u7248\u672c\n        classpath \"com.android.tools.build:gradle:3.5.3\"\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n\n        classpath \"com.tencent.tinker:tinker-patch-gradle-plugin:1.9.14\"\n}\n<\/code><\/pre>\n<blockquote><p>\n  App\u4e0b\u7684build.gradle\u914d\u7f6e\n<\/p><\/blockquote>\n<pre><code class=\"language-groovy line-numbers\">plugins {\n    id 'com.android.application'\n    id 'kotlin-android'\n    id 'kotlin-android-extensions'\n    id 'com.tencent.tinker.patch'\n}\n\/\/ \u5c06\u4e00\u4e9b\u914d\u7f6e\u5355\u72ec\u63d0\u53d6\u51fa\u6765\u653e\u5728\u4e00\u4e2a\u6587\u4ef6\u5185\napply from:'tinker.gradle'\n\nandroid {\n    signingConfigs{\n        release {\n            keyAlias 'iichen'\n            keyPassword '\n            storeFile file('.\/iichen.keystore')\n            storePassword ''\n        }\n        debug {\n            keyAlias 'iichen'\n            keyPassword ''\n            storeFile file('.\/iichen.keystore')\n            storePassword ''\n        }\n    }\n\n    dexOptions {\n        \/\/\u652f\u6301\u5927\u578b\u9879\u76ee\n        jumboMode = true\n    }\n\n    defaultConfig {\n        multiDexEnabled true\n        \/\/ \u5b9a\u4e49\u5728 gradle.properties\u6587\u4ef6\u5185  TINKER_ID = 102\uff0c\u7528\u4e8e\u53ef\u4ee5\u5728\u4ee3\u7801\u5185\u83b7\u53d6\n        buildConfigField \"String\" , \"TINKER_ID\" , \"\\\"${TINKER_ID}\\\"\"\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n            signingConfig signingConfigs.release\n        }\n        release {\n            minifyEnabled false\n            signingConfig signingConfigs.debug\n        }\n    }\n}\n\ndependencies {\n    implementation 'org.ow2.asm:asm:7.0'\n    implementation 'org.ow2.asm:asm-commons:7.0'\n\n\n    api(\"com.tencent.tinker:tinker-android-lib:1.9.14\") { changing = true }\n    implementation(\"com.tencent.tinker:tinker-android-loader:1.9.14\") { changing = true }\n\n    \/\/ \u6ce8\u89e3\u6784\u5efaapplication\u4f7f\u7528\n    annotationProcessor(\"com.tencent.tinker:tinker-android-anno:1.9.14\") { changing = true }\n    compileOnly(\"com.tencent.tinker:tinker-android-anno:1.9.14\") { changing = true }\n    implementation \"com.android.support:multidex:1.0.3\"\n}\n\n<\/code><\/pre>\n<blockquote><p>\n  tinker.gradle\u592a\u957f\u6587\u4ef6\u4e0b\u8f7d<br \/>\n  <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.iichen.cn\/wp-content\/uploads\/2022\/02\/tinker.gradle\" title=\"tinker.gradle\">tinker.gradle<\/a>\n<\/p><\/blockquote>\n<pre><code class=\"language-groovy line-numbers\">\/\/ \u6253\u4fee\u590d\u8865\u4e01\u9700\u8981\u4fee\u6539\u7684\u4f4d\u7f6e\next {\n    \/\/for some reason, you may want to ignore tinkerBuild, such as instant run debug build?\n    tinkerEnabled = true\n    \/\/\u57fa\u51c6apk\u8def\u5f84\uff0c\u5373\u9700\u8981\u4fee\u590d\u7684\u5305\u4ee5\u6539\u5305\u4e3a\u57fa\u51c6 \u8fd0\u884cgradle-&gt;tinker-&gt;thinkerPathchRelease\/Debug \n    \/\/ \u6784\u5efa\u65b0\u5305\u548c\u57fa\u51c6\u5305\u4e4b\u95f4\u7684 diff patch\u6587\u4ef6\u5305\n    tinkerOldApkPath = \"${bakPath}\/old-app.apk\"\n    \/\/\u672a\u5f00\u542f\u6df7\u6dc6\uff0c\u5219\u4e0d\u9700\u8981\u586b\u5199\n    tinkerApplyMappingPath = \"${bakPath}\/old-app-mapping.txt\"\n    \/\/\u57fa\u51c6apk\u4e2d\u7684R\u6587\u4ef6\u8def\u5f84\n    tinkerApplyResourcePath = \"${bakPath}\/old-app-R.txt\"\n    \/\/\u5982\u679c\u4f60\u4fee\u590d\u4e86res\u6587\u4ef6\uff0c\u9700\u8981\u6307\u5b9a\u4f60bug\u7248\u672c\u7684R.txt\u6587\u4ef6\n    tinkerBuildFlavorDirectory = \"${bakPath}\/flavor\"\n}\n<\/code><\/pre>\n<h4>\u4e8c\u3001\u6784\u5efaApplication<\/h4>\n<h4>2.1 \u975e\u6ce8\u89e3\u7684\u65b9\u5f0f<\/h4>\n<pre><code class=\"language-java line-numbers\">\/\/ \u5199\u5728\u6e05\u5355\u6587\u4ef6\u5185     android:name=\".IIApplication\"\nclass IIApplication :\n    TinkerApplication(\n        ShareConstants.TINKER_ENABLE_ALL,\n        IIApplicationLike::class.java.getName()\n)\n<\/code><\/pre>\n<pre><code class=\"language-java line-numbers\">internal class IIApplicationLike(\n    application: Application?,\n    tinkerFlags: Int,\n    tinkerLoadVerifyFlag: Boolean,\n    applicationStartElapsedTime: Long,\n    applicationStartMillisTime: Long,\n    tinkerResultIntent: Intent?\n) : DefaultApplicationLike(\n    application,\n    tinkerFlags,\n    tinkerLoadVerifyFlag,\n    applicationStartElapsedTime,\n    applicationStartMillisTime,\n    tinkerResultIntent\n) {\n    override fun onCreate() {\n        super.onCreate()\n        \/\/ \u8fd9\u91cc\u5b9e\u73b0SDK\u521d\u59cb\u5316\uff0c\n    }\n\n    \/**\n     * install multiDex before install tinker\n     * so we don't need to put the tinker lib classes in the main dex\n     *\n     * @param base\n     *\/\n    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n    override fun onBaseContextAttached(base: Context) {\n        super.onBaseContextAttached(base)\n        MultiDex.install(base)\n        setTinkerApplicationLike(this)\n        setUpgradeRetryEnable(true)\n        installTinker(this)\n        Tinker.with(application)\n    }\n\n    companion object {\n        private const val TAG = \"Tinker.SampleApplicationLike\"\n    }\n}\n<\/code><\/pre>\n<h4>2.2 \u6ce8\u89e3\u7684\u65b9\u5f0f<\/h4>\n<blockquote><p>\n  \u975e\u6ce8\u89e3\u7684\u65b9\u5f0f\u53ef\u4ee5\u770b\u5230\u9700\u8981\u591a\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\uff0c\u4f7f\u7528\u6ce8\u89e3\u5219\u76f4\u63a5\u5728\u7b2c\u4e8c\u4e2a\u6587\u4ef6\u4e0a\u52a0\u4e00\u4e2a\u6ce8\u89e3\u5373\u53ef\n<\/p><\/blockquote>\n<pre><code class=\"language-java line-numbers\">@DefaultLifeCycle(application = \"com.example.tinkertest.SampleApplication\", flags = ShareConstants.TINKER_ENABLE_ALL, loadVerifyFlag = false)\npublic class SampleApplicationLike extends DefaultApplicationLike {\n    private static final String TAG = \"Tinker.SampleApplicationLike\";\n\n    public SampleApplicationLike(Application application, int tinkerFlags, boolean tinkerLoadVerifyFlag,\n                                 long applicationStartElapsedTime, long applicationStartMillisTime, Intent tinkerResultIntent) {\n        super(application, tinkerFlags, tinkerLoadVerifyFlag, applicationStartElapsedTime, applicationStartMillisTime, tinkerResultIntent);\n    }\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        \/\/ \u8fd9\u91cc\u5b9e\u73b0SDK\u521d\u59cb\u5316\uff0c\n    }\n}\n<\/code><\/pre>\n<h4>2.3 \u4e0a\u9762\u6d89\u53ca\u7684\u6587\u4ef6<\/h4>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.iichen.cn\/wp-content\/uploads\/2022\/02\/thinker.zip\" title=\"\u6587\u4ef6\u4e0b\u8f7d\">\u6587\u4ef6\u4e0b\u8f7d<\/a><\/p>\n<pre><code class=\"language-java line-numbers\">&lt;provider\n          android:name=\"androidx.core.content.FileProvider\"\n          android:authorities=\"${applicationId}.provider\"\n          android:exported=\"false\"\n          android:grantUriPermissions=\"true\"&gt;\n    &lt;meta-data\n               android:name=\"android.support.FILE_PROVIDER_PATHS\"\n               android:resource=\"@xml\/provider_paths\"\/&gt;\n&lt;\/provider&gt;\n\n&lt;service\n         android:name=\".service.SampleResultService\"\n         android:exported=\"false\"\/&gt;\n\n&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;paths&gt;\n    &lt;external-path\n        name=\"external_storage_root\"\n        path=\".\" \/&gt;\n&lt;\/paths&gt;\n\n<\/code><\/pre>\n<h4>\u4e09\u3001\u6253\u4fee\u590d\u5305<\/h4>\n<ul>\n<li>\u5f53\u524d\u7ebf\u4e0a\u5305\u5373 \u57fa\u51c6\u5305 \u5982\uff1aold-app.apk \u5373\u5199\u5728thinker.gradle\u6587\u4ef6\u5185\u7684\u57fa\u51c6\u5305 \u540d\u5b57\u8981\u4e00\u6837<\/li>\n<li>\u5f53\u524d\u5df2\u4fee\u590d\u7684\u4ee3\u7801\u3002\u76f4\u63a5\u8fd0\u884c:<br \/>\n<div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg'><img class=\"lazyload lazyload-style-11\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"thinker_result.jpg\" \/><\/div><\/li>\n<\/ul>\n<h4>3.1 \u52a0\u8f7d\u8865\u4e01\u5305<\/h4>\n<pre><code class=\"language-java line-numbers\">\/\/ \u6ce8\u610fAndroid10\u53ca\u4e4b\u540e\u7684 \u6587\u4ef6\u5b58\u50a8\u66f4\u8fed\u53d8\u5316 \u53ef\u80fd\u5bfc\u81f4 \u8bfb\u53d6\u4e0d\u5230\u8865\u4e01\u5305\u7684\u60c5\u51b5\nval file = getExternalFilesDir(\"tinker\")\n\nfile?.apply {\n    \/\/ \u5c06\u4e0a\u8ff0\u751f\u6210\u7684\u8865\u4e01\u5305\u653e\u5230\u5e94\u7528\u7684\u79c1\u6709\u76ee\u5f55\u4e0b\n    \/\/ \/sdcard\/Android\/data\/\u5e94\u7528\u5305\u540d\/files\/patch_signed_7zip.apk\n    val patch = File(\"${file.absolutePath}\/patch_signed_7zip.apk\")\n    if(patch.exists()){\n        Toast.makeText(this@MainActivity,\"\u5f53\u524d\u57fa\u51c6\u5305\u7248\u672c\u53f7\uff1a${BuildConfig.TINKER_ID}\",Toast.LENGTH_LONG).show()\n        if (file.exists()) {\n            if (file.length() &gt; 0) {\n                Toast.makeText(this@MainActivity,\"\u8865\u4e01\u5305\u5b58\u5728 $patch\",Toast.LENGTH_SHORT).show()\n                TinkerInstaller.onReceiveUpgradePatch(this@MainActivity, patch.absolutePath)\n            }\n        }else{\n            Toast.makeText(this@MainActivity,\"\u8865\u4e01\u5305\u4e0d\u5b58\u5728\",Toast.LENGTH_SHORT).show()\n        }\n    }else{\n        Log.d(\"iichen\",\"\u8865\u4e01\u5305\u4e0d\u5b58\u5728\")\n    }\n}\n<\/code><\/pre>\n<h4>3.2 \u5378\u8f7d\u8865\u4e01\u5305<\/h4>\n<pre><code class=\"language-java line-numbers\">Tinker.with(applicationContext).cleanPatch();\/\/ \u5378\u8f7d\u6240\u6709\u7684\u8865\u4e01\n\/\/ \u8fd9\u4e2aID\u5c31\u662f\u4e0a\u8ff0\u5b9a\u4e49\u5728 gradle.properties\u5185\n\/\/ \u901a\u8fc7\u8be5ID\u6765\u5b9e\u73b0\u76f8\u5e94\u7684\u903b\u8f91 \u5f53\u7136\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 \u5b98\u65b9\u7684bugly\u7edf\u4e00\u7ba1\u7406\n\/\/Tinker.with(applicationContext).cleanPatchByVersion(BuildConfig.TINKER_ID)\/\/ \u5378\u8f7d\u6307\u5b9a\u7248\u672c\u7684\u8865\u4e01\n<\/code><\/pre>\n<h4>3.3 \u67e5\u770b\u8865\u4e01\u5305\u4fe1\u606f<\/h4>\n<pre><code class=\"language-java line-numbers\">val tinker = Tinker.with(applicationContext)\nval patchNum = String.format(\"[\u8865\u4e01\u53f7] %s \\n\", tinker.tinkerLoadResultIfPresent.getPackageConfigByName(\n                ShareConstants.TINKER_ID))\nval patchVersion = String.format(\"[\u8865\u4e01\u7248\u672c] %s \\n\", tinker.tinkerLoadResultIfPresent.getPackageConfigByName(\"patchVersion\"))\nval patchSpace = String.format(\"[\u8865\u4e01\u5360\u7528\u7a7a\u95f4] %s k \\n\", tinker.tinkerRomSpace)\nToast.makeText(this,\"\u8865\u4e01\u4fe1\u606f\uff1a$patchNum $patchVersion $patchSpace\",Toast.LENGTH_LONG).show()\n<\/code><\/pre>\n<p><code>\u52a0\u8f7d\u8865\u4e01\u540e\u9700\u8981\u91cd\u542f\u5e94\u7528\u6765\u5b9e\u73b0\u66f4\u65b0<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5f00\u59cb\u914d\u7f6e \u9879\u76eebuild.gradle\u914d\u7f6e dependencies { \/\/ \u6682\u65f6\u4e0d\u80fd\u8d85\u8fc74.0.0\u7248\u672c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,8],"tags":[],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","category-android","category-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen<\/title>\n<meta name=\"description\" content=\"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/iichen.cn\/?p=299\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen\" \/>\n<meta property=\"og:description\" content=\"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iichen.cn\/?p=299\" \/>\n<meta property=\"og:site_name\" content=\"IIchen\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-23T02:05:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\" \/>\n<meta name=\"author\" content=\"iichen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"iichen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/iichen.cn\/?p=299#article\",\"isPartOf\":{\"@id\":\"https:\/\/iichen.cn\/?p=299\"},\"author\":{\"name\":\"iichen\",\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"headline\":\"Android-\u70ed\u4fee\u590d\u4e4bThinker\",\"datePublished\":\"2022-02-23T02:05:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/iichen.cn\/?p=299\"},\"wordCount\":16,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"image\":{\"@id\":\"https:\/\/iichen.cn\/?p=299#primaryimage\"},\"thumbnailUrl\":\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\",\"articleSection\":[\"Android\",\"\u7b14\u8bb0\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/iichen.cn\/?p=299#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iichen.cn\/?p=299\",\"url\":\"https:\/\/iichen.cn\/?p=299\",\"name\":\"Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen\",\"isPartOf\":{\"@id\":\"https:\/\/iichen.cn\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/iichen.cn\/?p=299#primaryimage\"},\"image\":{\"@id\":\"https:\/\/iichen.cn\/?p=299#primaryimage\"},\"thumbnailUrl\":\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\",\"datePublished\":\"2022-02-23T02:05:36+00:00\",\"description\":\"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/iichen.cn\/?p=299#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iichen.cn\/?p=299\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/iichen.cn\/?p=299#primaryimage\",\"url\":\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\",\"contentUrl\":\"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iichen.cn\/?p=299#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/iichen.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android-\u70ed\u4fee\u590d\u4e4bThinker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/iichen.cn\/#website\",\"url\":\"https:\/\/iichen.cn\/\",\"name\":\"IIchen\",\"description\":\"Just do it!\",\"publisher\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/iichen.cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\",\"name\":\"iichen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg\",\"contentUrl\":\"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg\",\"width\":940,\"height\":940,\"caption\":\"iichen\"},\"logo\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.iichen.cn\"],\"url\":\"https:\/\/iichen.cn\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen","description":"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/iichen.cn\/?p=299","og_locale":"zh_CN","og_type":"article","og_title":"Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen","og_description":"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002","og_url":"https:\/\/iichen.cn\/?p=299","og_site_name":"IIchen","article_published_time":"2022-02-23T02:05:36+00:00","og_image":[{"url":"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg","type":"","width":"","height":""}],"author":"iichen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"iichen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/iichen.cn\/?p=299#article","isPartOf":{"@id":"https:\/\/iichen.cn\/?p=299"},"author":{"name":"iichen","@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"headline":"Android-\u70ed\u4fee\u590d\u4e4bThinker","datePublished":"2022-02-23T02:05:36+00:00","mainEntityOfPage":{"@id":"https:\/\/iichen.cn\/?p=299"},"wordCount":16,"commentCount":0,"publisher":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"image":{"@id":"https:\/\/iichen.cn\/?p=299#primaryimage"},"thumbnailUrl":"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg","articleSection":["Android","\u7b14\u8bb0"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/iichen.cn\/?p=299#respond"]}]},{"@type":"WebPage","@id":"https:\/\/iichen.cn\/?p=299","url":"https:\/\/iichen.cn\/?p=299","name":"Android-\u70ed\u4fee\u590d\u4e4bThinker - IIchen","isPartOf":{"@id":"https:\/\/iichen.cn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/iichen.cn\/?p=299#primaryimage"},"image":{"@id":"https:\/\/iichen.cn\/?p=299#primaryimage"},"thumbnailUrl":"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg","datePublished":"2022-02-23T02:05:36+00:00","description":"Android Tinker\u70ed\u4fee\u590d\u7684\u6574\u4e2a\u8fc7\u7a0b\u3002","breadcrumb":{"@id":"https:\/\/iichen.cn\/?p=299#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iichen.cn\/?p=299"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/iichen.cn\/?p=299#primaryimage","url":"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg","contentUrl":"https:\/\/s2.loli.net\/2022\/02\/23\/XWRlDrFxvs9Ownz.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/iichen.cn\/?p=299#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/iichen.cn\/"},{"@type":"ListItem","position":2,"name":"Android-\u70ed\u4fee\u590d\u4e4bThinker"}]},{"@type":"WebSite","@id":"https:\/\/iichen.cn\/#website","url":"https:\/\/iichen.cn\/","name":"IIchen","description":"Just do it!","publisher":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/iichen.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c","name":"iichen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/iichen.cn\/#\/schema\/person\/image\/","url":"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg","contentUrl":"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg","width":940,"height":940,"caption":"iichen"},"logo":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.iichen.cn"],"url":"https:\/\/iichen.cn\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299"}],"version-history":[{"count":0,"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}