今天用android studio從git下載項目的時候遇到一個問題,提示說Can't run Git: git.exe。下了一個git windows版本後,在studio的設置裏面有一個設置。 java
設置git.exe的路徑爲本地的有效路徑,點擊apply後,搞定。 android
android studio貌似有個bug,若是第一次設置的SDK路徑裏不包含source,那麼後期使用SDK Manager下載了source後,仍是沒法查看。 git
解決辦法: windows
具體close方法:File -> Close Project android-studio
從新選擇SDK路徑,固然咱們能夠選擇上次的路徑 app
說明:在從新設置上次的SDK路徑後,再次打開項目就有source code了。 ide
若是還不行的話,能夠參考下面的方法: gradle
或者 ui
Another approach would be to blow away all of Android Studio's auto-created SDKs and let it rebuild them. To do that google
提示上傳了可調試 APK文件。因爲使用的是studio開發,一度懷疑是gradle的問題。後來發現是依賴的第三方庫在manifest.xml文件定義了debugger=true,坑爹!
File - Import Settings
升級時提示 Connection failed. Please check your network connection and try again
修改安裝目錄下bin\studio.exe.vmoptions文件,如E:\Android\android-studio\bin\studio.exe.vmoptions
若是是64位系統,那就應該修改bin\studio64.exe.vmoptions文件
-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/
編譯提示:
android studio execution failed for task dexdebug...
輸入行太長...
等等語句
解決:
懷疑是依賴的項目有問題,仔細檢查發現依賴的一個項目library-a裏面有
dependencies { compile 'com.android.support:support-v4:13.0.0' compile 'com.android.support:gridlayout-v7:21.0.3' }
實際上這個庫裏面又沒有用到gridlayout,也就是說第二個depend是無效的,刪掉