Android Studio問(wèn)題匯總
一、git.exe問(wèn)題
今天用android studio從git下載項(xiàng)目的時(shí)候遇到一個(gè)問(wèn)題,提示說(shuō)Can't run Git: git.exe。下了一個(gè)git windows版本后,在studio的設(shè)置里面有一個(gè)設(shè)置。
設(shè)置git.exe的路徑為本地的有效路徑,點(diǎn)擊apply后,搞定。
二、attach source code
android studio貌似有個(gè)bug,如果***次設(shè)置的SDK路徑里不包含source,那么后期使用SDK Manager下載了source后,還是無(wú)法查看。
解決辦法:
1、close all project
具體close方法:File -> Close Project
2、Welcome to Android Studio screen, go to Configure > Project Defaults > Project Structure > SDKs
重新選擇SDK路徑,當(dāng)然我們可以選擇上次的路徑
3、重新打開(kāi)project
說(shuō)明:在重新設(shè)置上次的SDK路徑后,再次打開(kāi)項(xiàng)目就有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商店無(wú)法上傳應(yīng)用
提示上傳了可調(diào)試 APK文件。由于使用的是studio開(kāi)發(fā),一度懷疑是gradle的問(wèn)題。后來(lái)發(fā)現(xiàn)是依賴(lài)的第三方庫(kù)在manifest.xml文件定義了debugger=true,坑爹!