安装Android Studio(简称AS)
主流安装版本3.X
企业软件开发版本就低不就高 推荐3.0
https://盘.baidu.com/s/1AB6f4HrtMqAmM-HITYqyVA fqad
安装jdk
Android sdk与jdk的对应关系请看这里:
【Android各版本对应的SDK和JDK版本】
貌似现在jdk也不太好下载:
https://盘.baidu.com/s/1TpZVLle-IMymadrKaaWD3A m63c
安装gradle
as安装完以后,他可以自动联网安装很多插件和sdk,但是gradle被墙了,需要手动安装;
https://盘.baidu.com/s/1PubRSLT_l2Bij5p_k665tg nd9n
安装教程看这:
【手动安装gradle方法】
遇到的问题
-
Debug模式运行,提示
adb.exe进程被杀毒软件屏蔽,需卸载防火墙软件和杀毒软件 -
加载生成项目后,提示
重装Android Studio,使用与原有项目相同的版本 -
提示Application installation failed
错误弹窗如图:
Installation failed with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY:installPackageLI.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
1.Clean Project之后再试,如果还不行就在模拟器上面卸载该app。
2解决方法:
1、打开菜单File——Settings——Build,Execution,Deployment——Instant Run
2、不选中Enable Instant Run to hot swap code/resource changes on deploy(default enabled)
3、依次点击Apply——OK,重新运行程序,大功告成。
以后遇到其他问题会补充。