Android Studio 问题汇总
一、 问题
今天用 android studio 从 git 下载项目的时候遇到一个问题,提示说 Can't run Git:
。下了一个 git windows 版本后,在 studio 的设置里面有一个设置。
设置 的路径为本地的有效路径,点击 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 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 的问题。
后来发现是依赖的第三方库在 文件定义了 debugger=true,
Android Studio问题汇总
一、问题
二、attach source code
1、close all project
2、Welcome to Android Studio screen, go to Configur
3、重新打开project
三、Google Play商店无法上传应用