{"id":8376,"date":"2023-11-02T12:01:16","date_gmt":"2023-11-02T04:01:16","guid":{"rendered":"https:\/\/www.zhidianwl.net\/zhidianwl\/?p=8376"},"modified":"2023-11-02T12:01:16","modified_gmt":"2023-11-02T04:01:16","slug":"apk%e7%a7%98%e9%92%a5%e7%94%9f%e6%88%90android%e6%80%8e%e4%b9%88%e8%8e%b7%e5%8f%96%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.net\/zhidianwl\/2023\/11\/02\/apk%e7%a7%98%e9%92%a5%e7%94%9f%e6%88%90android%e6%80%8e%e4%b9%88%e8%8e%b7%e5%8f%96%ef%bc%9f\/","title":{"rendered":"apk\u79d8\u94a5\u751f\u6210android\u600e\u4e48\u83b7\u53d6\uff1f"},"content":{"rendered":"
\u5728 Android \u5f00\u53d1\u4e2d\uff0c\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u73af\u3002\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u53ef\u4ee5\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u6027\uff0c\u907f\u514d\u672a\u7ecf\u6388\u6743\u7684\u4eba\u5bf9\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\u548c\u7be1\u6539\u3002\u5728 Android \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u7b7e\u540d\u662f\u901a\u8fc7 APK \u79d8\u94a5\u751f\u6210\u7684\u3002<\/p>\n
APK \u79d8\u94a5\u662f\u4e00\u79cd\u6570\u5b57\u8bc1\u4e66\uff0c\u7528\u4e8e\u4e3a Android \u5e94\u7528\u7a0b\u5e8f\u751f\u6210\u6570\u5b57\u7b7e\u540d\u3002\u5728\u751f\u6210 APK \u6587\u4ef6\u4e4b\u524d\uff0c\u9700\u8981\u5148\u751f\u6210 APK \u79d8\u94a5\u3002APK \u79d8\u94a5\u5305\u542b\u516c\u94a5\u548c\u79c1\u94a5\u4e24\u90e8\u5206\uff0c\u79c1\u94a5\u7528\u4e8e\u7b7e\u540d APK \u6587\u4ef6\uff0c\u516c\u94a5\u7528\u4e8e\u9a8c\u8bc1 APK \u6587\u4ef6\u7684\u7b7e\u540d\u662f\u5426\u6709\u6548\u3002<\/p>\n
APK \u79d8\u94a5\u53ef\u4ee5\u901a\u8fc7 JDK \u4e2d\u7684 keytool \u5de5\u5177\u751f\u6210\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u751f\u6210\u6b65\u9aa4\uff1a<\/p>\n
1. \u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u8fdb\u5165 JDK \u7684 bin \u76ee\u5f55\u3002<\/p>\n
2. \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u751f\u6210\u4e00\u4e2a\u65b0\u7684 keystore \u6587\u4ef6\uff1a<\/p>\n
keytool -genkey -alias mykey -keyalg RSA -keystore mykey.keystore<\/p>\n
\u5176\u4e2d\uff0c-alias \u8868\u793a\u522b\u540d\uff0c-keyalg \u8868\u793a\u5bc6\u94a5\u7b97\u6cd5\uff0c-keystore \u8868\u793a keystore \u6587\u4ef6\u7684\u540d\u79f0\u3002<\/p>\n
3. \u8f93\u5165 keystore \u5bc6\u7801\u548c\u76f8\u5173\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n
Enter keystore password:<\/p>\n
Re-enter new password:<\/p>\n
What is your first and last name?<\/p>\n
[Unknown]: My Name<\/p>\n
What is the name of your organizational unit?<\/p>\n
[Unknown]: My Unit<\/p>\n
What is the name of your organization?<\/p>\n
[Unknown]: My Company<\/p>\n
What is the name of your City or Locality?<\/p>\n
[Unknown]: My City<\/p>\n
What is the name of your State or Province?<\/p>\n
[Unknown]: My State<\/p>\n
What is the two-letter country code for this unit?<\/p>\n
[Unknown]: US<\/p>\n
Is CN=My Name, OU=My Unit, O=My Company, L=My City, ST=My State, C=US correct?<\/p>\n
[no]: yes<\/p>\n
4. \u8f93\u5165\u5bc6\u94a5\u5bc6\u7801\uff0c\u5e76\u786e\u8ba4<\/p>\n
\uff1a<\/p>\n Enter key password for <\/p>\n (RETURN if same as keystore password):<\/p>\n Re-enter new password:<\/p>\n 5. \u751f\u6210\u7684 keystore \u6587\u4ef6\u4f1a\u4fdd\u5b58\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u3002<\/p>\n APK \u79d8\u94a5\u751f\u6210\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u8be5\u79d8\u94a5\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u3002\u5728 Android Studio \u4e2d\uff0c\u53ef\u4ee5\u5728\u9879\u76ee\u7684 bui\u7f13\u5b58\u767b\u5f55App\u6253\u5305<\/a>ld.gradle \u6587\u4ef6\u4e2d\u914d\u7f6e\u79d8\u94a5\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n android {<\/p>\n …<\/p>\n defaultConfig {<\/p>\n …<\/p>\n signingConfigs {<\/p>\n release {<\/p>\n storeFile file(“mykey.keystore”)<\/p>\n storePassword “mykeystorepassword”<\/p>\n keyAlias “mykey”<\/p>\n keyPassword “mykeypassword”<\/p>\n }<\/p>\n }<\/p>\n …<\/p>\n }<\/p>\n …<\/p>\n buildTypes {<\/p>\n release {<\/p>\n …<\/p>\n signingConfig signingConfigs.release<\/p>\n }<\/p>\n }<\/p>\n }<\/p>\n \u5176\u4e2d\uff0cstoreFile \u8868\u793a keystore \u6587\u4ef6\u7684\u8def\u5f84\uff0cstorePassword \u8868\u793a keystore \u7684\u5bc6\u7801\uff0ckeyAlias \u8868\u793a\u79d8\u94a5\u522b\u540d\uff0ckeyPassword \u8868\u793a\u79d8\u94a5\u5bc6\u7801\u3002<\/p>\n \u5728\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u4e4b\u524d\uff0c\u4e00\u5b9a\u8981\u4f7f\u7528\u79d8\u94a5\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\uff0c\u4ee5\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u6027\u3002\u5982\u679c\u5e94\u7528\u7a0b\u5e8f\u7684\u7b7e\u540d\u88ab\u7be1\u6539\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u751a\u81f3\u4f1a\u5f71\u54cd\u7528\u6237\u7684\u6570\u636e\u5b89\u5168\u3002\u56e0\u6b64\uff0c\u5728 Android \u5f00\u53d1\u4e2d\uff0c\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u662fios ipa \u5206\u53d1\u5e73\u53f0<\/a>\u975e\u5e38\u91cd\u8981\u7684\u4e00\u73af\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5728 Android \u5f00\u53d1\u4e2d\uff0c\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u73af\u3002\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u53ef\u4ee5\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u6027\uff0c\u907f\u514d\u672a\u7ecf\u6388\u6743\u7684\u4eba\u5bf9\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\u548c\u7be1\u6539\u3002\u5728 Android \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u7b7e\u540d\u662f\u901a\u8fc7 APK \u79d8\u94a5\u751f\u6210<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8084,3188,116,12,14312],"topic":[],"class_list":["post-8376","post","type-post","status-publish","format-standard","hentry","category-kaifaapp","tag-ios","tag-3188","tag-116","tag-12","tag-ipa"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/8376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=8376"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/8376\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=8376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=8376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=8376"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=8376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/figure>\n<\/p>\n