Android Studio問題匯總
一、git.exe問題
今天用android studio從git下載項目的時候遇到一個問題,提示說Can't run Git: git.exe。下了一個git windows版本后,在studio的設置里面有一個設置。
設置git.exe的路徑為本地的有效路徑,點擊apply后,搞定。
二、attach source code
android studio貌似有個bug,如果***次設置的SDK路徑里不包含source,那么后期使用SDK Manager下載了source后,還是無法查看。
解決辦法:
1、close all project
具體close方法:File -> Close Project
2、Welcome to Android Studio screen, go to Configure > Project Defaults > Project Structure > SDKs
重新選擇SDK路徑,當然我們可以選擇上次的路徑
3、重新打開project
說明:在重新設置上次的SDK路徑后,再次打開項目就有source code了。
如果還不行的話,可以參考下面的方法:
- Close all open projects
- From the Welcome to Android Studio screen, go to Configure > Project Defaults > Project Structure > SDKs
- Choose the appropriate Android API SDK that you installed source for, and go to Sourcepathpanel
- Press the + button, and choose the source directory.
或者
Another approach would be to blow away all of Android Studio's auto-created SDKs and let it rebuild them. To do that
- Exit Android Studio
- Delete the jdk.table.xml file, which on MacOS will be in your home directory underLibrary/Preferences/AndroidStudioPreview
- Relaunch Android Studio
- Go into Project Structure (either from the Welcome screen or from a project), and choose theAndroid SDK tab
- Make sure the Android SDK location and JDK location are correct.
三、Google Play商店無法上傳應用
提示上傳了可調試 APK文件。由于使用的是studio開發,一度懷疑是gradle的問題。后來發現是依賴的第三方庫在manifest.xml文件定義了debugger=true,坑爹!