如题所述
ããé¦å
Android Studioï¼ç¬¬ä¸å½ç¶è¦å®è£
JDKï¼Oracleå®ç½ä¸ä¸è½½å®è£
å°±è¡ãç¶ååè£
Android Studioï¼æè£
çæ¯Android Studio1.1.0 ãä¸é¢ç»åºçæ¯1.2 Preview 4ï¼å
æ¬WindowsåLinuxï¼ï¼è¯è¿ç´æ¥å¯ä»¥ä¸è½½ã
ããå®è£ ï¼ç¶åå®ä¼æç¤ºä½ ä¸è½½sdkï¼å°±è®©å®èªå·±å»ä¸è½½å§ï¼ä¸è½½å®ä¸ç´Nextï¼å®è£ å®æã
ããå ¶å®ç°å¨Android Studioå·²ç»å¯ä»¥ç¨äºï¼ä¸éè¦é ç½®ä»ä¹ç¯å¢åéã对æ¤æå½æ¶ä¹è¡¨ç¤ºæ¯è¾ç¥å¥ãå¯ä¸é çä¸ä¸ªç¯å¢åéï¼adb(Android Debug Bridge)
ããadbç¯å¢åé设置ï¼æå¼ç»ç«¯Terminalï¼è¾å ¥ open -e .bash_profileå车æå¼.bash_profileæ件ï¼ä¹å没é ç½®è¿åºè¯¥æ¯ç©ºçï¼è¾å ¥ï¼export PATH=${PATH}:~/Library/Android/sdk/tools:~/Library/Android/sdk/platform-toolsï¼æ²¡ææ¬å·ï¼è¿æ¯ä¸¤ä¸ªè·¯å¾toolsåplatform-toolsï¼æ ¹æ®èªå·±çµèSDKä¸toolsåplatform-toolsçè·¯å¾æ¿æ¢ä¸ï¼ä¿åãTerminalè¾å ¥source .bash_profileï¼åè¾adb shell,å°±ä¸ä¼not foundäºã
ããå ¶ä»è½¯ä»¶å°±æ¯æ£å¸¸å°å®è£ å°±è¡äºã
ãã2.Android Studio使ç¨åå¿«æ·é®
ããï¼1ï¼æ们æ°å»ºä¸ä¸ªé¡¹ç®åè¿å ¥çé¢ï¼å·¦ä¾§å¯ä»¥éæ©ProjectæAndroidï¼ä¸è¬éProjectä¼æ¯è¾ä¹ æ¯ä»¥åeclipseçæ¾ç¤º
ããï¼2ï¼ç¹å»å·¦ä¸è§Android Studioä¸Preferences(å¿«æ·é®command+,)ï¼è¿éå¯ä»¥è¿è¡åç§è®¾ç½®ã
ããIDE Settings>Editor>Colors & Fonts 设置é¢è²åä½ç
ããIDE Settings>Keymap 设置快æ·é®ï¼å¯ä»¥éeclipseççå¿«æ·é®ï¼å»ºè®®è¿æ¯ç¨Mac OSçï¼ä½¿ç¨èµ·æ¥æ¯è¾ç»ä¸ã
ããIDE Settings>Editor>Code Completion Case sensitive completion éNoneï¼è¿æ ·ä»£ç æ示çæ¶åä¸ä¼åºå大å°åï¼é»è®¤åºå大å°åï¼ä½ åstrå°±ä¸ä¼æ示Stringï¼ã
ããï¼3ï¼code常ç¨å¿«æ·é®
ããoption + enter èªå¨ä¿®æ£ï¼Android Studioèªå¨å¯¼å ï¼
ããcontrol + option + space 代ç æ示
ããcommand + c ä¸éä¸å¤å¶å½åè¡ï¼éä¸å¤å¶éä¸å 容
ããcommand + d ä¸éä¸å¤å¶å¹¶ç²è´´å½åè¡ï¼éä¸å¤å¶å¹¶ç²è´´éä¸å 容
ããcommand + x ä¸éä¸åªåå½åè¡ï¼éä¸åªåéä¸å 容
ããcommand + d ä¸éä¸å¤å¶å¹¶ç²è´´å½åè¡ï¼éä¸å¤å¶å¹¶ç²è´´éä¸å 容
ããcommand + b æå¼å æ å¤çç±»ææ¹æ³
ããcontrol + r è¿è¡é¡¹ç®
ããcommand + / 注é
ããcommand + alt + / å¤è¡æ³¨é
ãã3. adbçMonkeyæµè¯
ããé ç½®è¿adbç¯å¢åéä¹åå¯ä»¥ä½¿ç¨adbçä¸äºåè½ï¼ä¹åçå°è¿çä¸ä¸ªæ¯è¾ç«çMonkeyæµè¯ï¼åçæµè¯ï¼ã
ããè¿è¡é¡¹ç®å¨æ¨¡æå¨ä¸æçæºä¸ï¼å¨ç»ç«¯Terminalä¸è¾å ¥ adb shell monkey -p [ç¨åºå å] -v [äºä»¶æ°é] ,æ¯å¦(adb shell monkey -p com.aa.bb.xx -v 10000),å车ï¼è¿è¡é£å¿«çæµè¯ï¼æé误å¯ä»¥å¨logcatä¸çå°ãæ èçå®é£å¿«å°è·è¿æºç½çã
ããå®è£ ï¼ç¶åå®ä¼æç¤ºä½ ä¸è½½sdkï¼å°±è®©å®èªå·±å»ä¸è½½å§ï¼ä¸è½½å®ä¸ç´Nextï¼å®è£ å®æã
ããå ¶å®ç°å¨Android Studioå·²ç»å¯ä»¥ç¨äºï¼ä¸éè¦é ç½®ä»ä¹ç¯å¢åéã对æ¤æå½æ¶ä¹è¡¨ç¤ºæ¯è¾ç¥å¥ãå¯ä¸é çä¸ä¸ªç¯å¢åéï¼adb(Android Debug Bridge)
ããadbç¯å¢åé设置ï¼æå¼ç»ç«¯Terminalï¼è¾å ¥ open -e .bash_profileå车æå¼.bash_profileæ件ï¼ä¹å没é ç½®è¿åºè¯¥æ¯ç©ºçï¼è¾å ¥ï¼export PATH=${PATH}:~/Library/Android/sdk/tools:~/Library/Android/sdk/platform-toolsï¼æ²¡ææ¬å·ï¼è¿æ¯ä¸¤ä¸ªè·¯å¾toolsåplatform-toolsï¼æ ¹æ®èªå·±çµèSDKä¸toolsåplatform-toolsçè·¯å¾æ¿æ¢ä¸ï¼ä¿åãTerminalè¾å ¥source .bash_profileï¼åè¾adb shell,å°±ä¸ä¼not foundäºã
ããå ¶ä»è½¯ä»¶å°±æ¯æ£å¸¸å°å®è£ å°±è¡äºã
ãã2.Android Studio使ç¨åå¿«æ·é®
ããï¼1ï¼æ们æ°å»ºä¸ä¸ªé¡¹ç®åè¿å ¥çé¢ï¼å·¦ä¾§å¯ä»¥éæ©ProjectæAndroidï¼ä¸è¬éProjectä¼æ¯è¾ä¹ æ¯ä»¥åeclipseçæ¾ç¤º
ããï¼2ï¼ç¹å»å·¦ä¸è§Android Studioä¸Preferences(å¿«æ·é®command+,)ï¼è¿éå¯ä»¥è¿è¡åç§è®¾ç½®ã
ããIDE Settings>Editor>Colors & Fonts 设置é¢è²åä½ç
ããIDE Settings>Keymap 设置快æ·é®ï¼å¯ä»¥éeclipseççå¿«æ·é®ï¼å»ºè®®è¿æ¯ç¨Mac OSçï¼ä½¿ç¨èµ·æ¥æ¯è¾ç»ä¸ã
ããIDE Settings>Editor>Code Completion Case sensitive completion éNoneï¼è¿æ ·ä»£ç æ示çæ¶åä¸ä¼åºå大å°åï¼é»è®¤åºå大å°åï¼ä½ åstrå°±ä¸ä¼æ示Stringï¼ã
ããï¼3ï¼code常ç¨å¿«æ·é®
ããoption + enter èªå¨ä¿®æ£ï¼Android Studioèªå¨å¯¼å ï¼
ããcontrol + option + space 代ç æ示
ããcommand + c ä¸éä¸å¤å¶å½åè¡ï¼éä¸å¤å¶éä¸å 容
ããcommand + d ä¸éä¸å¤å¶å¹¶ç²è´´å½åè¡ï¼éä¸å¤å¶å¹¶ç²è´´éä¸å 容
ããcommand + x ä¸éä¸åªåå½åè¡ï¼éä¸åªåéä¸å 容
ããcommand + d ä¸éä¸å¤å¶å¹¶ç²è´´å½åè¡ï¼éä¸å¤å¶å¹¶ç²è´´éä¸å 容
ããcommand + b æå¼å æ å¤çç±»ææ¹æ³
ããcontrol + r è¿è¡é¡¹ç®
ããcommand + / 注é
ããcommand + alt + / å¤è¡æ³¨é
ãã3. adbçMonkeyæµè¯
ããé ç½®è¿adbç¯å¢åéä¹åå¯ä»¥ä½¿ç¨adbçä¸äºåè½ï¼ä¹åçå°è¿çä¸ä¸ªæ¯è¾ç«çMonkeyæµè¯ï¼åçæµè¯ï¼ã
ããè¿è¡é¡¹ç®å¨æ¨¡æå¨ä¸æçæºä¸ï¼å¨ç»ç«¯Terminalä¸è¾å ¥ adb shell monkey -p [ç¨åºå å] -v [äºä»¶æ°é] ,æ¯å¦(adb shell monkey -p com.aa.bb.xx -v 10000),å车ï¼è¿è¡é£å¿«çæµè¯ï¼æé误å¯ä»¥å¨logcatä¸çå°ãæ èçå®é£å¿«å°è·è¿æºç½çã
温馨提示:答案为网友推荐,仅供参考