当前位置:  编程技术>移动开发
本页文章导读:
    ▪鍒涘徐鏀寔澶氱灞忓箷灏哄鐨刟pk        鍒涘缓鏀寔澶氱灞忓箷灏哄鐨刟pk 聽 鍘熸枃鑷細http://android.eoe.cn/topic/ui 聽 鍒涘缓瀵逛袱绉嶄互涓婂睆骞曞昂瀵哥殑澶歛pk鏀寔锛圕reating Multiple APKs with 2+ Dimensions锛?/h3> 濡傛灉.........
    ▪ XCode4中的文本查寻和文本替换功能        XCode4中的文本查找和文本替换功能                     XCode4中的文本查找和文本替换功能     1.如果是在打开的文档范围内:       查找: Command+ F       替换: Option+Command+F         .........
    ▪ 输入法 小结-2       输入法 总结-2 openwnn_pref_ja.xml<?xml version="1.0" encoding="utf-8"?><PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"    android:key="openwnn_pref_ja" >    <PreferenceCategory android:title=".........

[1]鍒涘徐鏀寔澶氱灞忓箷灏哄鐨刟pk
    来源: 互联网  发布时间: 2014-02-18
鍒涘缓鏀寔澶氱灞忓箷灏哄鐨刟pk

鍘熸枃鑷細http://android.eoe.cn/topic/ui

鍒涘缓瀵逛袱绉嶄互涓婂睆骞曞昂瀵哥殑澶歛pk鏀寔锛圕reating Multiple APKs with 2+ Dimensions锛?/h3>

涓轰簡鍦ㄥ紑鍙慳ndroid搴旂敤绋嬪簭鐨勬椂鍊欏姞浠ュ埄鐢╣oogle瀹夊崜甯傚満鐨勫apk鏀寔鐗规€э紝鍒氬紑濮嬪氨閲囧彇涓€浜涜壇濂界殑鎺柦鍘诲鍔犲澶歛pk鐨勬敮鎸侊紝鏄潪甯搁噸瑕佺殑锛岃繖鏍峰彲浠ュ湪灏嗘潵寮€鍙戠殑杩囩▼涓噺灏戜笉蹇呰鐨勯夯鐑︺€傝繖涓€鑺傚皢鍚戞偍灞曠ず濡備綍涓轰綘鐨刟pp鍒涘缓澶歛pk鏀寔--涓嶅悓鐨刟pk鏀寔涓嶅悓鐨勫睆骞曞ぇ灏忋€傝繕灏嗚幏寰椾竴浜涚淮鎶ゅapk浠g爜搴撳敖鍙兘鐨勭畝鍗曠殑宸ュ叿銆?/p>

纭鎮ㄦ槸鍚﹂渶瑕佸apk鏀寔

褰撲綘璇曞浘鍒涘缓涓€涓敮鎸佽法澶歛ndroid璁惧鐨勫簲鐢ㄧ▼搴忔椂锛屽緢鑷劧鐨勪綘甯屾湜浣犵殑搴旂敤绋嬪簭鍙互鍦ㄦ墍鏈夌殑璁惧涓婇兘鐪嬭捣鏉ユ渶濂姐€備綘鏃㈡兂鍒╃敤澶у睆骞曠殑绌洪棿锛屼篃甯屾湜鑳藉湪灏忓睆骞曚笂杩愯锛屾兂鍒╃敤鏂癮pi鐨勭壒寰侊紝涔熸兂鍦ㄦ渶鏂拌澶囦笂鐨勭湅鍒扮殑绾圭悊鐗瑰緛鍚屾椂鑳藉湪鏃ц澶囦笂鍚屾牱鍙互鐪嬪埌銆?br >鍒氬紑濮嬬殑鏃跺€欒涓洪€氳繃鍒涘缓澶氫釜apk鍘绘敮鎸佸璁惧鏄渶濂界殑瑙e喅鏂规锛屼絾鏄線寰€涓嶆槸杩欐牱銆傝€屾槸浣跨敤鍗曚釜鐨刟pk鍘绘浛浠e涓猘pk锛屽紑鍙戞寚鍗椾腑鏈夊幓瀹屾垚杩欎釜鐩爣鏈夌敤鐨勪俊鎭紝鍖呮嫭濡備綍浣跨敤鏀寔搴?/a>鐨勪俊鎭€傝繕鍙互瀛︿範鍒板浣曞啓鍙兘杩愯鍦ㄧ壒瀹歛pi鐗堟湰鐨勪唬鐮佺殑鏂规硶锛岃€屼笉鍘讳娇鐢ㄥ儚鍙嶅皠杩欐牱鐨勯潪甯告秷鑰楄祫婧愮殑鎶€鏈€?/p>

濡傛灉浣犺兘璁╀綘鐨勫簲鐢ㄧ▼搴忓彧浣跨敤涓€涓猘pk锛屽皢鏈夊涓嬪嚑鐐瑰ソ澶勶細

  • * 鍙戝竷鍜屾祴璇曠畝鍗?/li>
  • * 鍙渶缁存姢涓€涓唬鐮佸簱
  • * 搴旂敤绋嬪簭鍙互閫傚簲涓嶅悓閰嶇疆鐨勮澶?/li>
  • * App鍙互璺ㄨ澶囪繍琛?/li>
  • * 浣犱笉蹇呰€冭檻market鐨勮姹傦紝apk鐨勫崌绾ф垨鑰卆pk灞炰簬鍝被璁惧

鍋囪鎮ㄥ凡缁忕爺绌朵簡杩欎釜鏂囨。锛屽凡缁忓涔犱簡閾炬帴椤甸潰鐨勫唴瀹癸紝骞朵笖纭畾澶歛pk鏀寔鐨勭▼搴忔槸浣犻渶瑕佺殑锛岄偅涔堣缁х画鐪嬩笅闈㈢殑灏忚妭銆?/p>

鐢诲嚭浣犵殑闇€姹?/h3>

棣栧厛鍒涘缓涓€涓畝鍗曠殑鍥捐〃鏉ュ揩閫熺‘瀹氫綘闇€瑕佸灏戜釜APK, 姣忎釜Apk瑕嗙洊鐨勫睆骞曞昂瀵歌寖鍥淬€傝櫧鐒跺垰寮€濮嬪惉璧锋潵闈炲父瀹规槗锛屼絾鏄瘡涓猵ai鐗堟湰鐨刟pk鍘诲疄鐜扮洰鏍囨湁鏄瘮杈冨洶闅剧殑锛岀壒鍒槸缁忓父鏈夐噸鍙犵殑閮ㄥ垎銆傚垢杩愮殑鏄紝閫氳繃鏈柟娉曪紝浣犱細寰堝鏄撶粯鍒跺嚭浣犵殑闇€姹?渚涗互鍚庡紑鍙戝弬鑰冦€傝鎴戜滑鍏堣璁轰竴涓嬪浣曟牴鎹睆骞曞昂瀵稿拰api鐗堟湰锛屼负apk鍒掑垎瀵瑰簲鐨勮澶囪寖鍥淬€傞鍏堟槸鍒涘缓涓€涓浘琛紝琛屽拰鍒楀搴斾竴涓€硷紝骞朵笖閮界敤棰滆壊濉厖锛屾瘡绉嶉鑹蹭唬琛ㄤ竴涓猘pk銆?br >

涓婇潰鐨勪緥瀛愭湁鍥涗釜apk锛岃摑鑹茬殑鏄负鎵€鏈夌殑small/normall灞忓箷璁惧鐨勫紑鍙戠殑锛岀豢鑹茬殑鏄负鎵€鏈夌殑large灞忓箷璁惧寮€鍙戠殑锛岀孩鑹茬殑鏄负xlarge璁惧睆骞曡澶囧紑鍙戠殑锛岃繖涓夌apk瀵瑰簲鐨凙PI鑼冨洿鏄?-10銆傜传鑹茬殑鏄竴涓壒渚嬶紝瀹冨彲浠ラ€傚簲鎵€鏈夌殑灞忓箷澶у皬锛屼絾鏄粎鏀寔API11鎴栬€呬互涓婄郴缁熴€傛洿閲嶈鐨勪竴鐐规槸锛屽綋浣犵瀰涓€鐪艰繖涓浘琛ㄧ殑鏃跺€欙紝浣犺兘蹇€熺殑鐪嬪嚭鏉ュ摢涓猘pk瀵瑰簲浠€涔圓PI锛屽搴斾粈涔堝睆骞曞ぇ灏忋€傛澶栦綘杩樺彲浠ヤ负姣忎竴涓猘pk璧蜂竴涓潪甯告媺椋庣殑寮€鍙戜唬鍙枫€傚綋鎴戜滑鐨勫洟闃熸垚鍛橀棶鎴戜滑锛屸€滄垜浠槸涓嶆槸璇ユ祴璇曠孩鑹茬殑閭d釜apk浜嗏€濓紝鑰屼笉鏄鈥滄垜浠槸涓嶆槸璇ユ祴璇曡繖涓敮鎸丄PI3-10锛屾敮鎸亁large灞忓箷锛屽苟涓斾笉鏄湪鎽╂墭鐨刋oom骞虫澘涓婄殑apk浜嗏€濓紝鏄剧劧锛屽墠涓€绉嶆柟寮忔洿瀹规槗鐞嗚В銆傝繕鏈夛紝鎶婅繖涓渶姹傚浘琛ㄦ墦鍗颁笅鏉ワ紝鍒嗗彂缁欐瘡涓€涓洟闃熸垚鍛樸€?/p>

鎶婃墍鏈夌殑鍏辩敤浠g爜鍜屽叡鐢ㄨ祫婧愭斁鍦ㄥ悓涓€涓簱宸ョ▼閲? Put All Common Code and Resources in a Library Project)

鏃犺浣犳槸淇敼涓€涓凡缁忓瓨鍦ㄧ殑Android搴旂敤绋嬪簭杩樻槸寮€濮嬪垱寤轰竴涓柊鐨勭▼搴忥紝棣栧厛鏈€閲嶈鐨勪换鍔″氨鏄垱寤轰竴涓叡鐢ㄤ唬鐮佸簱锛堝鏍囬鎵€璇寸殑搴撳伐绋嬶級銆傛妸閭d簺鍙渶鏇存柊涓€娆″氨鍙互鍑忓皯椤圭洰鐨勫紑鍙戞椂闂达紝鍑忓皯椤圭洰閿欒鐨勪唬鐮佹垨鑰呰祫婧愭斁杩涜繖涓簱宸ョ▼閲岋紙姣斿鍙互鏀惧湪浠g爜搴撻噷鐨勫儚鏈湴鍖栬瑷€瀛楃涓诧紝棰滆壊涓婚锛屽叡鐢╞ug鐨勪慨澶嶇瓑锛夈€?/p>

娉ㄦ剰锛?/strong>聽濡備綍鍒涘缓搴撻」鐩殑缁嗚妭锛屼笉鏄湰鑺傝璁茶В鐨勮寖鍥达紝鎮ㄥ彲浠ラ€氳繃涓嬮潰鐨勯摼鎺ュ揩閫熺殑浜嗚В濡備綍鍒涘缓搴撳伐绋嬶細

  • *聽鍒涘缓搴撳伐绋嬶紙鍦╡clipse涓級
  • *聽鍒涘缓搴撳伐绋嬶紙鍛戒护琛岋級

濡傛灉浣犳兂鎶婂凡鏈夌殑搴旂▼搴忚浆鎴愬apk鐨勬敮鎸侊紝闇€瑕侀噸鏂扮粍缁囦綘鐨勪唬鐮佷腑鐨勬墍鏈夌殑鏈湴鍖栧瓧绗︿覆鏂囦欢锛屽€煎垪琛紝棰滆壊涓婚锛岃彍鍗曞浘鏍囷紝甯冨眬鏂囦欢锛岃繖浜涜法apk鐨勪笉浼氭敼鍙樼殑璧勬簮鏂囦欢锛屽苟鎶婁粬浠斁鍒板簱宸ョ▼閲屻€傝繕鏈夋妸閭d簺涓嶄細鏀瑰彉澶鐨勪唬鐮佹斁鍒板簱宸ョ▼閲屻€傝繖鏍蜂綘灏嗕細鍙戠幇锛屼綘鍙互浠庝竴涓猘pk缁ф壙鍙︿竴涓猘pk閭d簺绫荤殑锛屾墿灞曚竴鍒颁袱涓柟娉曪紙鍑芥暟锛夈€?/p>

濡傛灉浣犲垰寮€濮嬪垱寤轰竴涓柊搴旂敤绋嬪簭锛岄鍏堣灏介噺鍦ㄤ竴涓簱宸ョ▼涓啓浠g爜锛屽鏋滃繀瑕佺殑鎯呭喌涓嬪仛鎴愪竴涓嫭绔嬬殑apk銆傝繖鏍峰湪浠ュ悗闀挎椂闂寸殑寮€鍙戣繃绋嬩腑锛岄暱杩滅湅鏉ユ槸闈炲父瀹规槗绠$悊鐨勶紝鍙互涓€鐐逛竴鐐圭殑娣诲姞鍏辩敤浠g爜鍜岃祫婧愶紝骞跺湪鏁版湀涔嬪悗鎸囧嚭杩欎簺浠g爜鎴栬€呰祫婧愬湪涓嶇粡淇敼鐨勬儏鍐典笅鏄惁璇ョЩ鍔ㄥ埌搴撻噷銆?/p>

鍒涘缓鏂扮殑APK宸ョ▼锛圕reate New APK Projects锛?/h3>

瀵逛簬闇€瑕佸彂甯冪殑姣忎釜APK锛岃鍒嗗埆涓烘瘡涓狝PK鍒涘缓Android宸ョ▼銆備负浜嗕究浜庣鐞嗭紝鎶婂簱宸ョ▼鍜屾墍鏈夌浉鍏崇殑APK宸ョ▼鏀惧湪鐩稿悓鐨勭埗鐩綍涓嬶紝鍚屾椂闇€瑕佽浣忔瘡涓狝PK闇€瑕佺浉鍚岀殑鍖呭悕锛岃櫧鐒朵粬浠湪杩欎釜搴撻噷涓嶅繀椤诲幓鍏变韩浠栦滑鐨勫寘鍚嶃€傛瘮濡傦紝濡傛灉浣犳湁4涓狝PK锛屾濡傚墠闈㈢殑瑙勫垯鎵€鎻忚堪鐨勶紝浣犵殑鏍圭洰褰曚細鍍忚繖鏍凤細

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
alexlucas:~/code/multi-apks-root$ ls

foo-blue

foo-green

foo-lib

foo-purple

foo-red

涓€鏃﹁繖涓伐绋嬪垱寤轰箣鍚庯紝鎶婅繖涓簱宸ョ▼寮曠敤鍒版瘡涓狝PK宸ョ▼锛屽鏋滃彲浠ョ殑璇濓紝鍦ㄥ簱宸ョ▼閲屽畾涔夊惎鍔ˋctivity锛屽苟鍦ˋPK宸ョ▼閲岀户鎵胯繖涓狝ctivity銆傛湁浜嗚繖涓湪搴撳伐绋嬩腑瀹氫箟鐨勫惎鍔ˋctivity锛屽彲浠ユ妸浣犵殑鎵€鏈夊簲鐢ㄧ▼搴忕殑鍒濆鍖栧伐浣滄斁鍦ㄤ竴涓湴鏂癸紝杩欐牱涓€鏉ユ瘡涓竴涓崟鐙殑APK灏变笉闇€瑕侀噸鏂板疄鐜拌繖浜涘儚鍒濆鍖栧垎鏋愶紝杩愯璁稿彲妫€鏌ョ瓑鍏朵粬鐨勪竴浜涘垵濮嬪寲宸ヤ綔锛屼笉鐢ㄤ竴涓釜APK鐨勫幓鍐欙紝缁存姢璧锋潵涔熶細绠€鍗曞ソ澶氥€?/p>

璋冩暣Manifests鏂囦欢锛圓djust the Manifests锛?/h3>

褰撶敤鎴蜂粠google瀹夊崜甯傚満涓嬭浇瀵瑰APK鏀寔鐨勭▼搴忔椂锛屾纭殑APK浣跨敤涓や釜绠€鍗曡鍒欙細

1.maifest宸茬粡琛ㄦ槑杩欎釜APK鏄悎鏍肩殑

2.瀵逛簬鎵€鏈夌殑鍚堟牸APK,鏀寔鐨凙ndroid API鐗堟湰鍙锋渶楂樿€呬紭鍏堣鍙戠幇銆?/p>

涓嬮潰鎴戜滑灏嗕互涓句緥鐨勬柟寮忚瑙o紝棣栧厛锛屽亣璁炬垜浠凡缁忎簡瑙d簡鍓嶉潰鎵€杩扮殑澶欰PK鐨勬弿杩帮紝骞朵笖杩欎簺apk鏀寔鎵€鏈夌殑灞忓箷灏哄锛岃€屼笉鏄粎浠呭彧鏀寔鐩爣灏哄鐨勫睆骞曪紝璁╂垜浠噸鏂扮湅涓€涓嬪墠闈㈢殑琛ㄦ牸锛?br >Since it鈥檚 okay for coverage to overlap, we can describe the area covered by each APK like so:

鍥犱负浠栦滑鏈夐噸鍚堢殑閮ㄥ垎锛屾垜浠彲浠ュ儚涓嬮潰涓€鏍峰幓鎻忚堪姣忎釜apk

    • 钃濊壊鐨勮鐩栨墍鏈夌殑灞忓箷灏哄锛屾渶浣庢敮鎸乻dk鏄?
    • 缁胯壊鐨勮鐩栧ぇ灞忓箷鎴栬€呮洿澶х殑灞忓箷锛屾渶浣庣殑sdk鏄?銆?/li>
    • 绾㈣壊鐨勮鐩栫殑鏄秴澶у睆骞曠殑锛堝钩甯哥殑骞虫澘锛夛紝鏈€浣庢敮鎸乻dk9
    • 绱壊鐨勮鐩栨墍鏈夌殑灞忓箷灏哄锛屾敮鎸佹渶浣巗dk11

璇锋敞鎰忥紝鍦ㄤ笂杩扮殑瑙勫垯涓湁寰堝閲嶅悎鐨勫湴鏂广€備妇涓緥瀛愶紝涓€涓獂larger灞忓箷鐨勮澶囷紝绯荤粺鐗堟湰鏄疉PI11,杩欎釜4涓猘pk鍏ㄩ兘鍙互鍦ㄨ繖涓澶囦笂杩愯锛屾垜浠牴鎹渶楂樼増鏈紭鍏堣鎼滃埌鐨勫師鍒欙紝鎴戜滑鍙互鎶婁粬浠殑浼樺厛绾у垪鍑烘潵锛?/p>

绱壊 鈮?绾㈣壊 鈮?缁胯壊 鈮?钃濊壊

涓轰粈涔堝厑璁搁噸鍙犲憿锛?br >鐜板湪鎴戜滑杩涗竴姝ュ亣璁撅紝绱壊鐨刟pk闇€瑕佷竴浜涘繀椤荤殑涓滆タ锛岃€屽叾浠栫殑涓ょapk涓嶉渶瑕佹湁銆俫oogle瀹夊崜甯傚満鐨勫紑鍙戣€呮寚鍗楅〉闈笂鍒楀嚭浜嗘墍鏈夌殑鍙兘杩囨护鎺変綘鐨勭▼搴忕殑缃瓉绁搁銆備负浜嗘洿濂界殑璁茶В渚嬪瓙锛屾垜浠户缁亣璁撅紝绱壊鐨刟pk闇€瑕佸墠缃憚鍍忓ご锛屽叧閿偣灏卞湪浜庯紝蹇呴』瑕佹眰鏈夊墠缃憚鍍忓ご锛屼絾鏄苟涓嶆槸鎵€鏈夌殑API11鎴栦互涓婅澶囦笂閮介厤鏈夊墠缃憚鍍忓ご锛屾槸涓嶆槸寰堟亹鎬栥€?/p>

骞歌繍鐨勬槸锛屽鏋滅敤鎴峰湪google瀹夊崜甯傚満浣跨敤杩欐牱鐨勮澶囨祻瑙堣蒋浠剁殑鏃跺€欙紝瀹夊崜甯傚満鐨勫紩鎿庨鍏堜細鍒癿anifest鏂囦欢閲岄潰鍘绘煡鐪嬫槸鍚﹀繀椤昏鏈夌殑鍓嶇疆鎽勫儚澶达紝濡傛灉蹇呴』瑕佹眰鏈夊墠缃憚鍍忓ご锛屽洜涓虹传鑹茬殑apk鍜岃澶囦笉鍖归厤锛岃繖涓传鑹茬殑apk灏嗕細琚拷鐣ユ帀锛涚劧鍚庡啀鏌ョ湅绾㈣壊鐨刟pk锛屽洜涓虹孩鑹茬殑apk鍗虫敮鎸亁larger灞忓箷锛屽鍓嶇疆鎽勫儚澶翠篃娌℃湁纭€х殑瑕佹眰锛実oogle play浼氳涓虹孩鑹茬殑apk鍙互鍜岃澶囧尮閰嶏紝绋嬪簭灏卞彲浠ヤ粠google play涓婁笅杞戒笅鏉ヨ瘯鐢ㄤ簡锛屽洜涓鸿嚦灏戞湁涓€涓敮鎸佽繖涓澶囩殑apk銆?/p>

涓轰簡鎶婃墍鏈夌殑apk鍒嗗埆澶勭悊锛岃瀹氫竴涓ソ鐨勭増鏈彿浣跨敤瑙勫垯鐗瑰埆閲嶈锛屽湪寮€鍙戣€呮寚鍗椾笂鏈夋帹鑽愮殑鐗堟湰鍙疯鍒?a href="http://docs.eoeandroid.com/guide/google/play/publishing/multiple-apks.html#VersionCodes" >Version Codes銆傝繖涓€閮ㄥ垎杩樻槸姣旇緝鍊煎緱闃呰鐨勶紝鍩烘湰瑕佺偣鏄负涓€缁刟pk璁惧畾瑙勫垯锛屾垜浠敤涓や釜鏁板瓧浠h〃鏈€浣庢敮鎸佺殑绯荤粺鐗堟湰鍙凤紝鐢ㄤ袱涓暟瀛椾唬琛ㄦ敮鎸佺殑鏈€澶ф垨鑰呮渶灏忓睆骞曞ぇ灏忥紝鍙﹀鐨勪笁涓暟瀛椾唬琛ㄨ嚜宸辩殑绋嬪簭鐨勭増鏈€傞€氳繃杩欑鏂瑰紡锛屽綋璁惧鐨勭郴缁熷崌绾х殑鏃跺€欙紝姣斿浠?0鍗囩骇鍒?1锛宎pk鍗囩骇鐨勬椂鍊欙紝鍦ㄦ墍鏈夌殑apk涓紝浼樺厛琚崌绾х殑apk鏄綋鍓嶅畨瑁呭湪璁惧涓婄殑閭d釜apk銆備笅闈㈡槸涓€涓増鏈彿浣跨敤瑙勫垯鐨勪竴涓緥瀛愶紝鍙互瀹氫箟鎴愬涓嬫牸寮忥紝

钃濊壊: 0304001, 0304002, 0304003...

缁胯壊: 0334001, 0334002, 0334003

绾㈣壊: 0344001, 0344002, 0344003...

绱壊: 1104001, 1104002, 1104003...

杩欎笁绉嶅湪绋嬪簭鐨刴anifests鏂囦欢涓畾涔夊垎鍒涓嬶細
钃濊壊:

1
2
3
4
5
6
7
8
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="0304001" android:versionName="1.0" package="com.example.foo">
    <uses-sdk android:minSdkVersion="3" />
    <supports-screens android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true" />
    ...

缁胯壊:

1
2
3
4
5
6
7
8
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="0334001" android:versionName="1.0" package="com.example.foo">
    <uses-sdk android:minSdkVersion="3" />
    <supports-screens android:smallScreens="false"
        android:normalScreens="false"
        android:largeScreens="true"
        android:xlargeScreens="true" />
    ...

绾㈣壊:

1
2
3
4
5
6
7
8
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="0344001" android:versionName="1.0" package="com.example.foo">
    <uses-sdk android:minSdkVersion="3" />
    <supports-screens android:smallScreens="false"
        android:normalScreens="false"
        android:largeScreens="false"
        android:xlargeScreens="true" />
    ...

绱壊:

1
2
3
4
5
6
7
8
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1104001" android:versionName="1.0" package="com.example.foo">
    <uses-sdk android:minSdkVersion="11" />
    <supports-screens android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true" />
    ...

娉ㄦ剰涓€涓嬶紝鍦ㄦ妧鏈笂锛屼竴涓猘pk瑕佷箞鏈夋敮鎸佺殑鐗瑰畾灞忓箷鐨勬爣璁帮紝瑕佷箞鏈夊吋瀹规€х殑灞忓箷鐨勬爣璁帮紝鏀寔鐨勫睆骞曟槸浼樺厛鑰冭檻鐨勩€備絾鏄鏋滃悓鏃舵湁杩欎袱涓爣璁版槸寰堜笉濂界殑鍋氭硶锛岃繖鏍蜂細澧炲姞棰濆鐨勫鏉傛€э紝澧炲姞鏈轰細鎬ч敊璇€傚悓鏃惰繕瑕佹敞鎰忥紝涓嶈浣跨敤榛樿鐨勫€硷紙small鍜宯ormal榛樿鎯呭喌涓嬫€绘槸true锛夛紝鍦╩anifesets涓簲璇ユ槑纭寚瀹氬睆骞曞ぇ灏忕殑鍊笺€傝繖鏍蜂細鍑忓皯浠ュ悗鐨勯夯鐑?--椤轰究涓句釜渚嬪瓙锛宮anifest鐨勭洰鏍噑dk瑕佹眰灏忎簬9锛屽鏋滀娇鐢ㄩ粯璁ゅ€硷紝xlarge鑷姩璁剧疆涓篺alse锛寈large鐨勫睆骞曞皢涓嶄細鏀寔锛屽洜姝ゆ渶濂借鏄庣‘鎸囧畾銆?/p>

鍙戝竷鍓嶇殑妫€鏌?Go Over Pre-launch Checklist)

寰€google play涓婁笂浼犵▼搴忎箣鍓嶏紝涓€瀹氳鏍规嵁涓嬮潰鐨勬潯鐩粩缁嗙殑妫€鏌ヤ笅绋嬪簭銆傝浣忥紝杩欎簺鏉$洰涓庡apk鏀寔鍏崇郴闈炲父瀵嗭紝浣嗘槸杩欓噷骞舵病鏈夊垪鍑烘墍鏈夌殑闇€瑕佹鏌ユ竻鍗曘€?/p>

  • * 鎵€鏈夌殑apk蹇呴』鏈夌浉鍚岀殑鍖呭悕
  • * 鎵€鏈夌殑apk蹇呴』鐢ㄧ浉鍚岀殑鏁板瓧璇佷功绛惧悕
  • * 濡傛灉杩欎簺apk鏈夌郴缁熺増鏈噸鍚堢殑鍦版柟锛屾渶浣庣郴缁熺増鏈彿鏈€澶х殑閭d釜apk蹇呴』鏈変竴涓洿楂樼増鏈彿锛圛f the APKs overlap in platform version, the one with the higher minSdkVersion must have a higher version code锛?/li>
  • * 浠讳綍涓€绉嶄綘灏嗘湁鏀寔鐨勫睆骞曞ぇ灏忛兘瑕佸湪manifest涓缃垚true,濡傛灉涓嶆兂鏀寔鐨勫氨璁剧疆鎴恌alse銆?/li>
  • * 浠旂粏妫€瑙唌anifest鐨勮繃婊ゆ潯浠舵槸鍚︽湁鍐茬獊鐨勫湴鏂癸紙姣斿锛屼竴涓猘pk鍙敮鎸亁lager鐨勫睆骞曠殑璁惧锛屽氨涓嶈琚墍鏈夌殑璁惧鐪嬪埌锛?/li>
  • * 姣忎竴涓猘pk鐨刴enifest蹇呴』鑷冲皯鏀寔涓€绉嶅睆骞曪紝openGL texture鎴栬€呯郴缁熺増鏈€?/li>
  • * 姣忎竴涓猘pk鑷冲皯鍦ㄤ竴涓璁惧涓婃祴璇曡繃銆傞櫎闈炰綘鏄负瀹氬埗鐨勮澶囧紑鍙戠▼搴忋€?/li>

鎶婄▼搴忔彁浜ゅ埌google甯傚満涔嬪墠锛岃繕瑕佸缂栬瘧杩囩殑绋嬪簭杩涜妫€鏌ワ紝纭繚娌℃湁涓€浜涘叾浠栫殑鏄庢樉鐨勯棶棰樿€屽奖鍝嶄綘鐨勭▼搴忓湪google甯傚満涓婅鍙戠幇銆備娇鐢╝apt锛圓ndroid Asset Packaging Tool锛屾槸鐢熸垚鍜屾墦鍖卆ndroid搴旂敤绋嬪簭鐨勯噸瑕佹瀯寤哄伐鍏凤級杩欎釜宸ュ叿杩涜缂栬瘧妫€鏌ョ壒鍒殑绠€鍗曚究鍒┿€?/p>

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
>aapt dump badging
package: name='com.example.hello' versionCode='1' versionName='1.0'
sdkVersion:'11'
uses-permission:'android.permission.SEND_SMS'
application-label:'Hello'
application-icon-120:'res/drawable-ldpi/icon.png'
application-icon-160:'res/drawable-mdpi/icon.png'
application-icon-240:'res/drawable-hdpi/icon.png'
application: label='Hello' icon='res/drawable-mdpi/icon.png'
launchable-activity: name='com.example.hello.HelloActivity'  label='Hello' icon=''
uses-feature:'android.hardware.telephony'
uses-feature:'android.hardware.touchscreen'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240'

褰撲綘鍦ㄦ鏌apt鐨勮緭鍑烘椂锛岀‘淇濇敮鎸佺殑灞忓箷鍜屽吋瀹圭殑灞忓箷鐨勫€间笉鍐茬獊锛屼笉瑕佸湪manifest涓殑"uses-feature"娣诲姞涓€浜涗綘骞朵笉闇€瑕佺殑绯荤粺鏉冮檺.濡備笂闈㈢殑渚嬪瓙锛岃繖涓猘pk涓嶄細琚緢澶氱殑璁惧鐪嬪埌銆?/p>

涓轰粈涔堝憿锛熶緥瀛愪腑鏄剧ず锛屽鍔犱簡SEND_SMS鐨勬潈闄愯姹傦紝杩欎釜鐗瑰緛闇€瑕佸鍔燼ndroid.hardware.telephony纭欢鏀寔銆備粠api11 Honeycomb寮€濮嬫槸閽堝骞虫澘鐢佃剳鐨勭郴缁燂紝娌℃湁鎵撶數璇濈殑纭欢鏀寔锛孏oogle play灏嗕細杩囨护鎺変笉鏀寔鎵撶數璇濈殑璁惧锛屽彧鏈堿PI鐗堟湰鍖归厤锛屽悓鏃舵敮鎸佹墦鐢佃瘽鐨勭‖浠舵敮鎸佹墠涓嶄細琚繃婊ゆ帀銆?/p>

鍙互闈炲父瀹规槗鐨勫湪manifest涓慨澶嶈繖涓棶棰橈細

1
<uses-feature android:name="android.hardware.telephony" android:required="false" />

android.hardvare.touchscreen 鏉冮檺瑕佹眰涔熸湰涓嶆纭殑鍔犺繘鍘讳簡锛屽鏋滀綘鎯充綘鐨刟pk鑳借娌℃湁瑙︾鍔熻兘鐨刟ndroid绯荤粺鐨勬櫤鑳界數瑙嗕篃鑳藉湪甯傚満涓婃悳绱㈠埌锛岃繘琛屽涓嬭缃細

1
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />v

褰撲綘瀹屾垚浜嗗彂甯冨墠鐨勬鏌ワ紝浣犲氨鍙互鍚慻oogle play涓婃彁浜や綘鐨刟pk浜嗐€傚彂甯冨畬涔嬪悗鍐嶅幓google play鍋氭渶鍚庝竴鐐规鏌ワ紝鍘讳笂闈㈡悳绱綘鐨勭▼搴忥紝涓嬭浇涓嬫潵锛屼互纭繚浣犵殑鐩爣璁惧鍙互鎼滃埌锛屽苟鑳戒娇鐢ㄣ€傛伃鍠滄偍锛岀幇鍦ㄦ偍宸茬粡瀹屾垚浜嗘湰鑺傝绋嬶紒锛侊紒


    
[2] XCode4中的文本查寻和文本替换功能
    来源: 互联网  发布时间: 2014-02-18
XCode4中的文本查找和文本替换功能
                    XCode4中的文本查找和文本替换功能
    1.如果是在打开的文档范围内:
      查找: Command+ F
      替换: Option+Command+F
                  Replace All   是全部替换本文档范围内的字符串
                  Replace 是替换当前字符串
                  Replace & Find是边查找边替换
 
 
 
   2.如果是全局查找和替换
      查找:点击左边工具栏里面的“放大镜”按钮  或者 Shift+Command +F
      替换:点击左边工具栏里面的“放大镜”按钮,然后左边 Find 改为 Replace即可。或者 Shift+Option+Command+F

    
[3] 输入法 小结-2
    来源: 互联网  发布时间: 2014-02-18
输入法 总结-2
openwnn_pref_ja.xml

<?xml version="1.0" encoding="utf-8"?>

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:key="openwnn_pref_ja" >

    <PreferenceCategory android:title="@string/preference_key_setting_menu" >
        <CheckBoxPreference
            android:key="key_sound"
            android:summary="@string/preference_key_sound_summary"
            android:title="@string/preference_key_sound_title" />
        <CheckBoxPreference
            android:key="key_vibration"
            android:summary="@string/preference_key_vibration_summary"
            android:title="@string/preference_key_vibration_title" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:key="popup_preview"
            android:summary="@string/preference_preview_summary"
            android:title="@string/preference_preview_title" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:key="auto_caps"
            android:summary="@string/preference_auto_caps_summary"
            android:title="@string/preference_auto_caps_title" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/preference_conversion_menu" >
        <CheckBoxPreference
            android:defaultValue="true"
            android:key="opt_enable_learning"
            android:summary="@string/preference_input_learning_summary"
            android:title="@string/preference_input_learning_title" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:key="opt_prediction"
            android:summary="@string/preference_prediction_summary"
            android:title="@string/preference_prediction_title" />
        <CheckBoxPreference
            android:defaultValue="true"
            android:dependency="opt_prediction"
            android:key="opt_spell_correction"
            android:summary="@string/preference_correct_spell_summary"
            android:title="@string/preference_correct_spell_title" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/preference_dictionary_menu" >
        <PreferenceScreen
            android:key="user_dictionary_edit_words"
            android:persistent="false"
            android:summary="@string/preference_user_dictionary_edit_words_summary_ja"
            android:title="@string/preference_dictionary_menu_ja" >
        </PreferenceScreen>
        <PreferenceScreen
            android:key="user_dictionary_edit_words"
            android:persistent="false"
            android:summary="@string/preference_user_dictionary_edit_words_summary_en"
            android:title="@string/preference_dictionary_menu_en" >
        </PreferenceScreen>

    </PreferenceCategory>
    <PreferenceCategory android:title="@string/preference_aboutime_menu" >
        <Preference
           
            android:key="openwnn_version"
            android:summary="@string/openwnn_japanese_copyright"
            android:title="@string/openwnn_japanese" />
    </PreferenceCategory>

</PreferenceScreen>

    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3