{"id":307,"date":"2024-01-05T16:10:08","date_gmt":"2024-01-05T08:10:08","guid":{"rendered":"http:\/\/162.14.82.114\/?p=307"},"modified":"2024-01-05T16:10:08","modified_gmt":"2024-01-05T08:10:08","slug":"andriod%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84","status":"publish","type":"post","link":"http:\/\/162.14.82.114\/index.php\/307\/01\/05\/2024\/","title":{"rendered":"andriod\u6587\u4ef6\u7ed3\u6784"},"content":{"rendered":"<h1>andriod\u6587\u4ef6\u7ed3\u6784<\/h1>\n<blockquote>\n<p><strong>Android\u5305<\/strong>\uff08\u82f1\u8bed\uff1aAndroid Package\uff0c<strong>APK<\/strong>\uff09\uff0c\u662fAndroid\u64cd\u4f5c\u7cfb\u7edf\u4f7f\u7528\u7684\u4e00\u79cd\u5e94\u7528\u7a0b\u5e8f\u5305\u6587\u4ef6\u683c\u5f0f\uff0c\u7528\u4e8e\u5206\u53d1\u548c\u5b89\u88c5\u79fb\u52a8\u5e94\u7528\u53ca\u4e2d\u95f4\u4ef6\u3002\u4e00\u4e2aAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4ee3\u7801\u60f3\u8981\u5728Android\u8bbe\u5907\u4e0a\u8fd0\u884c\uff0c\u5fc5\u987b\u5148\u8fdb\u884c\u7f16\u8bd1\uff0c\u7136\u540e\u88ab\u6253\u5305\u6210\u4e3a\u4e00\u4e2a\u88abAndroid\u7cfb\u7edf\u6240\u80fd\u8bc6\u522b\u7684\u6587\u4ef6\u624d\u53ef\u4ee5\u88ab\u8fd0\u884c\uff0c\u800c\u8fd9\u79cd\u80fd\u88abAndroid\u7cfb\u7edf\u8bc6\u522b\u5e76\u8fd0\u884c\u7684\u6587\u4ef6\u683c\u5f0f\u4fbf\u662f\u201cAPK\u201d\u3002 \u4e00\u4e2aAPK\u6587\u4ef6\u5185\u5305\u542b\u88ab\u7f16\u8bd1\u7684\u4ee3\u7801\u6587\u4ef6(.dex \u6587\u4ef6)\uff0c\u6587\u4ef6\u8d44\u6e90\uff08resources\uff09\uff0c assets\uff0c\u8bc1\u4e66\uff08certificates\uff09\uff0c\u548c\u6e05\u5355\u6587\u4ef6\uff08manifest file\uff09\u3002<\/p>\n<p>APK\u6587\u4ef6\u57fa\u4e8eZIP\u6587\u4ef6\u683c\u5f0f\uff0c\u5b83\u4e0eJAR\u6587\u4ef6\u7684\u6784\u9020\u65b9\u5f0f\u76f8\u4f3c\u3002\u5b83\u7684\u4e92\u8054\u7f51\u5a92\u4f53\u7c7b\u578b\u4e92\u8054\u7f51\u5a92\u4f53\u7c7b\u578b)\u662f\uff1a<code>application\/vnd.android.package-archive<\/code>\u3002<\/p>\n<\/blockquote>\n<p>\u9996\u5148\uff0c\u5c06<code>.apk<\/code>\u6587\u4ef6\u540e\u7f00\u540d\u6539\u4e3a<code>.zip<\/code>\uff0c\u7136\u540e\u89e3\u538b\u6253\u5f00\uff0c\u4ee5\u4e0b\u9762\u8457\u540d\u5f00\u6e90\u9879\u76ee<strong><a href=\"https:\/\/github.com\/SilenceDut\/KnowWeather\">KnowWeather<\/a><\/strong>\u4e3a\u4f8b\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img\/202401051609907.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img\/202401051609907.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20240105141221985\" \/><\/div><\/p>\n<p>\u5176\u4e2d\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u6587\u4ef6\u5939\u540d\u79f0<\/th>\n<th style=\"text-align: left;\">\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">META-INF<\/td>\n<td style=\"text-align: left;\">\u5728Android\u5e94\u7528\u7684APK\u6587\u4ef6\u4e2d\uff0cMETA-INF\u6587\u4ef6\u5939\u662f\u5b58\u653e\u6570\u5b57\u7b7e\u540d\u76f8\u5173\u6587\u4ef6\u7684\u6587\u4ef6\u5939\uff0c\u7b7e\u540d\u4fe1\u606f\u53ef\u4ee5\u9a8c\u8bc1APK\u6587\u4ef6\u7684\u5b8c\u6574\u6027\uff0c\u76f8\u5f53\u4e8eAPK\u7684\u8eab\u4efd\u8bc1(\u9a8c\u8bc1\u6587\u4ef6\u662f\u5426\u88ab\u4fee\u6539)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">assets<\/td>\n<td style=\"text-align: left;\">\u5b58\u653eAPK\u7684\u9759\u6001\u8d44\u6e90\u6587\u4ef6\uff0c\u6bd4\u5982\u89c6\u9891\uff0c\u97f3\u9891\uff0c\u56fe\u7247\u7b49\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5939\u4e0b\u7684\u8d44\u6e90\u6587\u4ef6\u4e0d\u4f1a\u88ab\u7f16\u8bd1\u3002\u4e0d\u88ab\u7f16\u8bd1\u7684\u8d44\u6e90\u6587\u4ef6\u662f\u6307\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u88ab\u8f6c\u6362\u6210\u4e8c\u8fdb\u5236\u4ee3\u7801\u7684\u6587\u4ef6\uff0c\u800c\u662f\u76f4\u63a5\u88ab\u6253\u5305\u5230\u6700\u7ec8\u7684\u7a0b\u5e8f\u4e2d\u3002\u8fd9\u4e9b\u6587\u4ef6\u901a\u5e38\u662f\u4e00\u4e9b\u9759\u6001\u8d44\u6e90\uff0c\u5982\u56fe\u7247\u3001\u97f3\u9891\u3001\u6587\u672c\u6587\u4ef6\u7b49\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">res<\/td>\n<td style=\"text-align: left;\">\u8d44\u6e90\u6587\u4ef6\u76ee\u5f55\uff0c\u4e8c\u8fdb\u5236\u683c\u5f0f\u3002\u5b9e\u9645\u4e0a\uff0cAPK\u6587\u4ef6\u4e0b\u7684res\u6587\u4ef6\u5939\u5e76\u4e0d\u662f\u4e8c\u8fdb\u5236\u683c\u5f0f\uff0c\u800c\u662f\u7ecf\u8fc7\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u8d44\u6e90\u6587\u4ef6\u3002\u5728Android\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u4e2d\uff0c\u8d44\u6e90\u6587\u4ef6\u901a\u5e38\u662f\u4ee5XML\u683c\u5f0f\u5b58\u50a8\u7684\uff0c\u5982\u5e03\u5c40\u6587\u4ef6\u3001\u5b57\u7b26\u4e32\u8d44\u6e90\u3001\u989c\u8272\u8d44\u6e90\u7b49\u3002\u5728\u7f16\u8bd1\u65f6\uff0cAndroid\u7f16\u8bd1\u5668\u4f1a\u5c06\u8fd9\u4e9bXML\u8d44\u6e90\u6587\u4ef6\u7f16\u8bd1\u6210\u4e8c\u8fdb\u5236\u683c\u5f0f\u7684\u8d44\u6e90\u6587\u4ef6\uff0c\u4ee5\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u6548\u7387\u548c\u5b89\u5168\u6027\u3002\u867d\u7136res\u6587\u4ef6\u5939\u4e0b\u7684\u4e8c\u8fdb\u5236\u8d44\u6e90\u6587\u4ef6\u4e0d\u80fd\u76f4\u63a5\u7f16\u8f91\u548c\u4fee\u6539\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u4ecd\u7136\u53ef\u4ee5\u901a\u8fc7Android\u63d0\u4f9b\u7684\u8d44\u6e90\u7ba1\u7406\u5de5\u5177\uff0c\u5982aapt\u3001apktool\u7b49\uff0c\u6765\u53cd\u7f16\u8bd1\u548c\u7f16\u8f91\u8fd9\u4e9b\u8d44\u6e90\u6587\u4ef6\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">AndroidManifest.xml<\/td>\n<td style=\"text-align: left;\">AndroidManifest.xml\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6700\u91cd\u8981\u7684\u6587\u4ef6\u4e4b\u4e00\uff0c\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u5982\u5e94\u7528\u7a0b\u5e8f\u7684\u540d\u79f0\u3001\u56fe\u6807\u3001\u7248\u672c\u53f7\u3001\u6743\u9650\u3001\u7ec4\u4ef6\uff08Activity\u3001Service\u3001BroadcastReceiver\u3001Content Provider\uff09\u7b49\u7b49\u3002\u5728\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u65f6\uff0c\u7cfb\u7edf\u4f1a\u6839\u636e\u8fd9\u4e2a\u6587\u4ef6\u6765\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f\uff0c\u542f\u52a8\u548c\u5173\u95ed\u5e94\u7528\u7a0b\u5e8f\uff0c\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u7684\u7ec4\u4ef6\u7b49\u7b49\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">classes.dex<\/td>\n<td style=\"text-align: left;\">classes.dex\u662fjava\u6e90\u7801\u7f16\u8bd1\u540e\u751f\u6210\u7684java\u5b57\u8282\u7801\u6587\u4ef6\uff0cAPK\u8fd0\u884c\u7684\u4e3b\u8981\u903b\u8f91<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">resources.arsc<\/td>\n<td style=\"text-align: left;\">\u662f Android \u7cfb\u7edf\u4e2d\u7684\u4e00\u79cd\u7279\u6b8a\u6587\u4ef6\uff0c\u5b83\u7528\u6765\u5b58\u653e\u5e94\u7528\u7a0b\u5e8f\u7684\u8d44\u6e90\u8868\u3002\u8d44\u6e90\u8868\u662f\u4e00\u79cd\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u8d44\u6e90 ID \u548c\u8d44\u6e90\u7c7b\u578b\u7684\u6620\u5c04\u5173\u7cfb\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">lib<\/td>\n<td style=\"text-align: left;\">armeabi-v7a\u57fa\u672c\u901a\u7528\u6240\u6709android\u8bbe\u5907<br \/>arm64-v8a\u53ea\u9002\u7528\u4e8e64\u4f4d\u7684android\u8bbe\u5907<br \/>x86\u5e38\u89c1\u7528\u4e8eandroid\u6a21\u62df\u5668<br \/>x86-64\u76ee\u5f55\u9002\u7528\u4e8e\u652f\u6301x86_64\u67b6\u6784\u7684Android\u8bbe\u5907<br \/>\u76ee\u5f55\u4e0b\u7684.so\u6587\u4ef6\u662fc\u6216c++\u7f16\u8bd1\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u6587\u4ef6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u91cc\u6ca1\u627e\u5230lib\u6587\u4ef6\uff0c\u53ef\u80fd\u662f\u8be5\u5e94\u7528\u662f\u7eaf<code>Java\/Kotlin<\/code>\u5f00\u53d1\u4e14\u6ca1\u6709\u4f7f\u7528\u4efb\u4f55\u7279\u5b9a\u4e8e\u5e73\u53f0\u7684\u4ee3\u7801\u3002<\/p>\n<h2>AndriodManifest.xml<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u6709\u6548\u5143\u7d20<\/th>\n<th style=\"text-align: center;\">\u4f5c\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;action&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u5411 Intent \u8fc7\u6ee4\u5668\u6dfb\u52a0\u64cd\u4f5c\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;activity&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e Activity \u7ec4\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;activity-alias&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e Activity \u7684\u522b\u540d\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;application&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u5e94\u7528\u7684\u58f0\u660e\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;category&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u5411 Intent \u8fc7\u6ee4\u5668\u6dfb\u52a0\u7c7b\u522b\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;compatible-screens&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u5b9a\u4e0e\u5e94\u7528\u517c\u5bb9\u7684\u6bcf\u4e2a\u5c4f\u5e55\u914d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;data&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u5411 Intent \u8fc7\u6ee4\u5668\u6dfb\u52a0\u6570\u636e\u89c4\u8303\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;grant-uri-permission&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u5b9a\u7236\u7ea7\u5185\u5bb9\u63d0\u4f9b\u7a0b\u5e8f\u6709\u6743\u8bbf\u95ee\u7684\u5e94\u7528\u6570\u636e\u7684\u5b50\u96c6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;instrumentation&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u652f\u6301\u60a8\u76d1\u63a7\u5e94\u7528\u4e0e\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u7684 <code>Instrumentation<\/code> \u7c7b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;intent-filter&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u5b9a Activity\u3001\u670d\u52a1\u6216\u5e7f\u64ad\u63a5\u6536\u5668\u53ef\u4ee5\u54cd\u5e94\u7684 Intent \u7c7b\u578b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;manifest&gt;<\/code><\/td>\n<td style=\"text-align: center;\">AndroidManifest.xml \u6587\u4ef6\u7684\u6839\u5143\u7d20\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;meta-data&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u53ef\u4ee5\u63d0\u4f9b\u7ed9\u7236\u7ea7\u7ec4\u4ef6\u7684\u5176\u4ed6\u4efb\u610f\u6570\u636e\u9879\u7684\u540d\u79f0-\u503c\u5bf9\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;path-permission&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u5b9a\u4e49\u5185\u5bb9\u63d0\u4f9b\u7a0b\u5e8f\u4e2d\u7279\u5b9a\u6570\u636e\u5b50\u96c6\u7684\u8def\u5f84\u548c\u6240\u9700\u6743\u9650\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;permission&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5b89\u5168\u6743\u9650\uff0c\u53ef\u7528\u4e8e\u9650\u5236\u5bf9\u6b64\u5e94\u7528\u6216\u5176\u4ed6\u5e94\u7528\u7684\u7279\u5b9a\u7ec4\u4ef6\u6216\u529f\u80fd\u7684\u8bbf\u95ee\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;permission-group&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u4e3a\u76f8\u5173\u6743\u9650\u7684\u903b\u8f91\u5206\u7ec4\u58f0\u660e\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;permission-tree&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u6743\u9650\u6811\u7684\u57fa\u672c\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;provider&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5185\u5bb9\u63d0\u4f9b\u7a0b\u5e8f\u7ec4\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;receiver&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5e7f\u64ad\u63a5\u6536\u5668\u7ec4\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;service&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u670d\u52a1\u7ec4\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;supports-gl-texture&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5e94\u7528\u652f\u6301\u7684\u4e00\u79cd GL \u7eb9\u7406\u538b\u7f29\u683c\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;supports-screens&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5e94\u7528\u652f\u6301\u7684\u5c4f\u5e55\u5c3a\u5bf8\uff0c\u5e76\u4e3a\u5927\u4e8e\u6b64\u5c3a\u5bf8\u7684\u5c4f\u5e55\u542f\u7528\u5c4f\u5e55\u517c\u5bb9\u6a21\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-configuration&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u660e\u5e94\u7528\u8981\u6c42\u7684\u7279\u5b9a\u8f93\u5165\u529f\u80fd\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-feature&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u58f0\u660e\u5e94\u7528\u4f7f\u7528\u7684\u5355\u4e2a\u786c\u4ef6\u6216\u8f6f\u4ef6\u529f\u80fd\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-library&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u5b9a\u5e94\u7528\u5fc5\u987b\u94fe\u63a5\u5230\u7684\u5171\u4eab\u5e93\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-permission&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u5b9a\u4e3a\u4f7f\u5e94\u7528\u6b63\u5e38\u8fd0\u884c\uff0c\u7528\u6237\u5fc5\u987b\u6388\u4e88\u7684\u7cfb\u7edf\u6743\u9650\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-permission-sdk-23&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u6307\u660e\u5e94\u7528\u9700\u8981\u7279\u5b9a\u6743\u9650\uff0c\u4f46\u4ec5\u5f53\u5e94\u7528\u5728\u8fd0\u884c Android 6.0\uff08API \u7ea7\u522b 23\uff09\u6216\u66f4\u9ad8\u7248\u672c\u7684\u8bbe\u5907\u4e0a\u5b89\u88c5\u65f6\u624d\u9700\u8981\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>&lt;uses-sdk&gt;<\/code><\/td>\n<td style=\"text-align: center;\">\u60a8\u53ef\u4ee5\u901a\u8fc7\u6574\u6570\u5f62\u5f0f\u7684 API \u7ea7\u522b\uff0c\u8868\u793a\u5e94\u7528\u4e0e\u4e00\u4e2a\u6216\u591a\u4e2a\u7248\u672c\u7684 Android \u5e73\u53f0\u7684\u517c\u5bb9\u6027\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u53c2\u8003\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;manifest\n    xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    android:versionCode=&quot;1&quot;\n    android:versionName=&quot;1.0&quot;\n    package=&quot;com.example.myapp&quot;&gt;\n\n    &lt;!-- Beware that these values are overridden by the build.gradle file --&gt;\n    &lt;uses-sdk android:minSdkVersion=&quot;15&quot; android:targetSdkVersion=&quot;26&quot; \/&gt;\n\n    &lt;application\n        android:allowBackup=&quot;true&quot;\n        android:icon=&quot;@mipmap\/ic_launcher&quot;\n        android:roundIcon=&quot;@mipmap\/ic_launcher_round&quot;\n        android:label=&quot;@string\/app_name&quot;\n        android:supportsRtl=&quot;true&quot;\n        android:theme=&quot;@style\/AppTheme&quot;&gt;\n\n        &lt;!-- This name is resolved to com.example.myapp.MainActivity\n             based upon the package attribute --&gt;\n        &lt;activity android:name=&quot;.MainActivity&quot;&gt;\n            &lt;intent-filter&gt;\n                &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;\n                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;\n            &lt;\/intent-filter&gt;\n        &lt;\/activity&gt;\n\n        &lt;activity\n            android:name=&quot;.DisplayMessageActivity&quot;\n            android:parentActivityName=&quot;.MainActivity&quot; \/&gt;\n    &lt;\/application&gt;\n&lt;\/manifest&gt;<\/code><\/pre>\n<h2>res<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">res\u5b50\u76ee\u5f55<\/th>\n<th style=\"text-align: center;\">\u5b58\u50a8\u7684\u8d44\u6e90\u7c7b\u578b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><code>animator\/<\/code><\/td>\n<td style=\"text-align: center;\">\u7528\u4e8e\u5b9a\u4e49<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/graphics\/prop-animation?hl=zh-cn\">\u5c5e\u6027\u52a8\u753b<\/a>\u7684 XML \u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>anim\/<\/code><\/td>\n<td style=\"text-align: center;\">\u7528\u4e8e\u5b9a\u4e49<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/graphics\/view-animation?hl=zh-cn#tween-animation\">\u8865\u95f4\u52a8\u753b<\/a>\u7684 XML \u6587\u4ef6\u3002\u5c5e\u6027\u52a8\u753b\u4e5f\u53ef\u4fdd\u5b58\u5728\u6b64\u76ee\u5f55\u4e2d\uff0c\u4f46\u4e3a\u4e86\u533a\u5206\u8fd9\u4e24\u79cd\u7c7b\u578b\uff0c\u5c5e\u6027\u52a8\u753b\u9996\u9009 <code>animator\/<\/code> \u76ee\u5f55\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>color\/<\/code><\/td>\n<td style=\"text-align: center;\">\u5b9a\u4e49\u989c\u8272\u72b6\u6001\u5217\u8868\u7684 XML \u6587\u4ef6\u3002\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/color-list-resource?hl=zh-cn\">\u989c\u8272\u72b6\u6001\u5217\u8868\u8d44\u6e90<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>drawable\/<\/code><\/td>\n<td style=\"text-align: center;\">\u4f4d\u56fe\u6587\u4ef6\uff08PNG\u3001<code>.9.png<\/code>\u3001JPG \u6216 GIF\uff09\u6216\u7f16\u8bd1\u4e3a\u4ee5\u4e0b\u53ef\u7ed8\u5236\u8d44\u6e90\u5b50\u7c7b\u578b\u7684 XML \u6587\u4ef6\uff1a\u4f4d\u56fe\u6587\u4ef6\u4e5d\u5bab\u56fe\uff08\u53ef\u8c03\u6574\u5927\u5c0f\u7684\u4f4d\u56fe\uff09\u72b6\u6001\u5217\u8868\u5f62\u72b6\u52a8\u753b\u53ef\u7ed8\u5236\u5bf9\u8c61\u5176\u4ed6\u53ef\u7ed8\u5236\u5bf9\u8c61\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/drawable-resource?hl=zh-cn\">\u53ef\u7ed8\u5236\u8d44\u6e90<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>mipmap\/<\/code><\/td>\n<td style=\"text-align: center;\">\u9002\u7528\u4e8e\u4e0d\u540c\u542f\u52a8\u5668\u56fe\u6807\u5bc6\u5ea6\u7684\u53ef\u7ed8\u5236\u5bf9\u8c61\u6587\u4ef6\u3002\u5982\u9700\u8be6\u7ec6\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 <code>mipmap\/<\/code> \u6587\u4ef6\u5939\u7ba1\u7406\u542f\u52a8\u5668\u56fe\u6807\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/training\/multiscreen\/screendensities?hl=zh-cn#mipmap\">\u5c06\u5e94\u7528\u56fe\u6807\u653e\u5728 mipmap \u76ee\u5f55\u4e2d<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>layout\/<\/code><\/td>\n<td style=\"text-align: center;\">\u7528\u4e8e\u5b9a\u4e49\u754c\u9762\u5e03\u5c40\u7684 XML \u6587\u4ef6\u3002\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/layout-resource?hl=zh-cn\">\u5e03\u5c40\u8d44\u6e90<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>menu\/<\/code><\/td>\n<td style=\"text-align: center;\">\u7528\u4e8e\u5b9a\u4e49\u5e94\u7528\u83dc\u5355\uff08\u4f8b\u5982\u9009\u9879\u83dc\u5355\u3001\u4e0a\u4e0b\u6587\u83dc\u5355\u6216\u5b50\u83dc\u5355\uff09\u7684 XML \u6587\u4ef6\u3002\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/menu-resource?hl=zh-cn\">\u83dc\u5355\u8d44\u6e90<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>raw\/<\/code><\/td>\n<td style=\"text-align: center;\">\u9700\u4ee5\u539f\u59cb\u5f62\u5f0f\u4fdd\u5b58\u7684\u4efb\u610f\u6587\u4ef6\u3002\u5982\u8981\u4f7f\u7528\u539f\u59cb <code>InputStream<\/code> \u6253\u5f00\u8fd9\u4e9b\u8d44\u6e90\uff0c\u8bf7\u4f7f\u7528\u8d44\u6e90 ID\uff08\u5373 <code>R.raw.*filename*<\/code>\uff09\u8c03\u7528 <code>Resources.openRawResource()<\/code>\u3002\u4f46\u662f\uff0c\u5982\u9700\u8bbf\u95ee\u539f\u59cb\u6587\u4ef6\u540d\u548c\u6587\u4ef6\u5c42\u6b21\u7ed3\u6784\uff0c\u8bf7\u8003\u8651\u5c06\u8d44\u6e90\u4fdd\u5b58\u5728 <code>assets\/<\/code> \u76ee\u5f55\uff08\u800c\u975e <code>res\/raw\/<\/code>\uff09\u4e0b\u3002<code>assets\/<\/code> \u4e2d\u7684\u6587\u4ef6\u6ca1\u6709\u8d44\u6e90 ID\uff0c\u56e0\u6b64\u60a8\u53ea\u80fd\u4f7f\u7528 <code>AssetManager<\/code> \u8bfb\u53d6\u8fd9\u4e9b\u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>values\/<\/code><\/td>\n<td style=\"text-align: center;\">\u5305\u542b\u5b57\u7b26\u4e32\u3001\u6574\u6570\u548c\u989c\u8272\u7b49\u7b80\u5355\u503c\u7684 XML \u6587\u4ef6\u3002\u5176\u4ed6 <code>res\/<\/code> \u5b50\u76ee\u5f55\u4e2d\u7684 XML \u8d44\u6e90\u6587\u4ef6\u4f1a\u6839\u636e XML \u6587\u4ef6\u540d\u5b9a\u4e49\u5355\u4e2a\u8d44\u6e90\uff0c\u800c <code>values\/<\/code> \u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u53ef\u63cf\u8ff0\u591a\u4e2a\u8d44\u6e90\u3002\u5bf9\u4e8e\u6b64\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\uff0c<code>&lt;resources&gt;<\/code> \u5143\u7d20\u7684\u6bcf\u4e2a\u5b50\u5143\u7d20\u5747\u4f1a\u5b9a\u4e49\u4e00\u4e2a\u8d44\u6e90\u3002\u4f8b\u5982\uff0c<code>&lt;string&gt;<\/code> \u5143\u7d20\u4f1a\u521b\u5efa <code>R.string<\/code> \u8d44\u6e90\uff0c<code>&lt;color&gt;<\/code> \u5143\u7d20\u4f1a\u521b\u5efa <code>R.color<\/code> \u8d44\u6e90\u3002\u7531\u4e8e\u6bcf\u4e2a\u8d44\u6e90\u5747\u4f7f\u7528\u81ea\u5df1\u7684 XML \u5143\u7d20\u8fdb\u884c\u5b9a\u4e49\uff0c\u56e0\u6b64\u60a8\u53ef\u4ee5\u968f\u610f\u547d\u540d\u6587\u4ef6\uff0c\u5e76\u5728\u67d0\u4e2a\u6587\u4ef6\u4e2d\u653e\u5165\u4e0d\u540c\u7684\u8d44\u6e90\u7c7b\u578b\u3002\u4f46\u662f\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5c06\u72ec\u7279\u7684\u8d44\u6e90\u7c7b\u578b\u653e\u5728\u4e0d\u540c\u7684\u6587\u4ef6\u4e2d\uff0c\u4f7f\u5176\u4e00\u76ee\u4e86\u7136\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u53ef\u5728\u6b64\u76ee\u5f55\u4e2d\u521b\u5efa\u7684\u8d44\u6e90\uff0c\u4e0b\u9762\u7ed9\u51fa\u4e86\u76f8\u5e94\u7684\u6587\u4ef6\u540d\u7ea6\u5b9a\uff1a<code>arrays.xml<\/code> \u7528\u4e8e\u8d44\u6e90\u6570\u7ec4\uff08<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/more-resources?hl=zh-cn#TypedArray\">\u7c7b\u578b\u5316\u6570\u7ec4<\/a>\uff09<code>colors.xml<\/code> \u7528\u4e8e<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/more-resources?hl=zh-cn#Color\">\u989c\u8272\u503c<\/a><code>dimens.xml<\/code> \u7528\u4e8e<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/more-resources?hl=zh-cn#Dimension\">\u7ef4\u5ea6\u503c<\/a><code>strings.xml<\/code> \u7528\u4e8e<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/string-resource?hl=zh-cn\">\u5b57\u7b26\u4e32\u503c<\/a><code>styles.xml<\/code> \u7528\u4e8e<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/style-resource?hl=zh-cn\">\u6837\u5f0f<\/a>\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/string-resource?hl=zh-cn\">\u5b57\u7b26\u4e32\u8d44\u6e90<\/a>\u3001<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/style-resource?hl=zh-cn\">\u6837\u5f0f\u8d44\u6e90<\/a>\u548c<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/resources\/more-resources?hl=zh-cn\">\u66f4\u591a\u8d44\u6e90\u7c7b\u578b<\/a>\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>xml\/<\/code><\/td>\n<td style=\"text-align: center;\">\u53ef\u5728\u8fd0\u884c\u65f6\u901a\u8fc7\u8c03\u7528 <code>Resources.getXML()<\/code> \u8bfb\u53d6\u7684\u4efb\u610f XML \u6587\u4ef6\u3002\u5404\u79cd XML \u914d\u7f6e\u6587\u4ef6\uff08\u4f8b\u5982<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/search\/searchable-config?hl=zh-cn\">\u641c\u7d22\u914d\u7f6e<\/a>\uff09\u90fd\u5fc5\u987b\u4fdd\u5b58\u5728\u6b64\u5904\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><code>font\/<\/code><\/td>\n<td style=\"text-align: center;\">\u5e26\u6709\u6269\u5c55\u540d\u7684\u5b57\u4f53\u6587\u4ef6\uff08\u4f8b\u5982 TTF\u3001OTF \u6216 TTC\uff09\uff0c\u6216\u5305\u542b <code>&lt;font-family&gt;<\/code> \u5143\u7d20\u7684 XML \u6587\u4ef6\u3002\u5982\u9700\u8be6\u7ec6\u4e86\u89e3\u4ee5\u8d44\u6e90\u5f62\u5f0f\u4f7f\u7528\u7684\u5b57\u4f53\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.google.cn\/guide\/topics\/ui\/look-and-feel\/fonts-in-xml?hl=zh-cn\">\u5c06\u5b57\u4f53\u6dfb\u52a0\u4e3a XML \u8d44\u6e90<\/a>\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img\/202401051609450.svg'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img\/202401051609450.svg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"apk\u6587\u4ef6\u683c\u5f0f\" \/><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>andriod\u6587\u4ef6\u7ed3\u6784 Android\u5305\uff08\u82f1\u8bed\uff1aAndroid Package\uff0cAPK\uff09\uff0c\u662fAndroid\u64cd\u4f5c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-307","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":1,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"predecessor-version":[{"id":308,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/307\/revisions\/308"}],"wp:attachment":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}