1. Module的移除
先要在File—>Project Structure 或者 此模塊右鍵--》 open module setting 中將此module“減“掉後才能在項目中Module右鍵的Delete鍵可用。
2.修改Logcat顏色
http://www.cnblogs.com/kangyi/p/5083680.html
3. 顯示行號
Settings --> Editor --> Appearance ,勾選 Show line numbers 。
4. 顯示空格。
這樣就能看出縮進是 tab 縮進還是空格縮進。建議使用空格縮進。
Settings --> Editor --> Appearance ,勾選 Show whitespaces 。
5.Android Studio會提醒你 JDK 或者 Android SDK 不存在,你需要重新設置。你需要到全局的Project Structure 頁面下進行設置。進入全局的 Project Structure 頁面方法如下:
-- 在歡迎界面,選擇 Configure --> Project Defaults --> Project Structure
-- 選擇 File --> Other Settings --> Default Project Structure
6. 統一文件編碼。出於字符兼容的問題,建議使用 utf-8 。
Settings --> File Encodings 。建議將 IDE Encoding 、 Project Encoding 、 Properties Fiels 都設置成統一的編碼。
7. 如何添加依賴,以及依賴的類型
進入 Project Structure -- dependencies 下按+後添加依賴。
依賴類型的含義:
Compile
compile是對所有的build type以及favlors都會參與編譯並且打包到最終的apk文件中。
Provided
Provided是對所有的build type以及favlors只在編譯時使用,類似eclipse中的external-libs,只參與編譯,不打包到最終apk。
APK
只會打包到apk文件中,而不參與編譯,所以不能再代碼中直接調用jar中的類或方法,否則在編譯時會報錯
Test compile
Test compile 僅僅是針對單元測試代碼的編譯編譯以及最終打包測試apk時有效,而對正常的debug或者release apk包不起作用。
Debug compile
Debug compile 僅僅針對debug模式的編譯和最終的debug apk打包。
Release compile
Release compile 僅僅針對Release 模式的編譯和最終的Release apk打包。