[背景]
有个android的程序,是用Eclipse+ADT开发的。
现在想要去查看代码而已,打算在mac下,安装最新版本的Android Studio,用于查看之前基于Eclipse+ADT的android的源码。
[折腾过程]
1.搜:
android studio mac download
参考:
(很诧异:现在,android的developer官网主页网站竟然可以打开了
-》之前一直都没法打开的。。)
下载下来300多MB的安装文件:
然后去安装:
2.结果运行时出错Java Not Found,所以去:
3.然后继续打开Android Studio:
新界面啊,把mobile之外的watch,glass,auto,tv,都加上去了
结果此处的Android Studio需要java 7:
然后继续去折腾安装java 7:
然后再点击 Detect,即可检测到java 7了:
记录一下,此处的java 7的路径:
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
安装类型选择默认的:标准
再去确认设置:
Setup type: Standard Destination Folder: /Users/crifan/Library/Android/sdk Total Download Size: 432 MB Sdk Components to Download: Android SDK Build-tools, revision 23.0.1 36.3 MB Android SDK Platform-tools, revision 23.0.1 2.37 MB Android SDK Tools, revision 24.4.0 97.1 MB Android Support Repository, revision 24 142 MB Google Repository, revision 22 56.7 MB Intel x86 Emulator Accelerator (HAXM installer), revision 5.5.0 219 KB SDK Platform Android 6.0, API 23, revision 1 67.1 MB Sources for Android SDK, API 23, revision 1 30.3 MB
然后就可以下载了:
Downloading android-sdk_r22.6.2-macosx.zip from https://dl.google.com/android/android-sdk_r22.6.2-macosx.zip Unpacking android-sdk_r22.6.2-macosx.zip Installing Archives: Preparing to install archives Installing SDK Platform Android 6.0, API 23, revision 1 Installed SDK Platform Android 6.0, API 23, revision 1 Installing Android SDK Build-tools, revision 23.0.1 Installed Android SDK Build-tools, revision 23.0.1 Installing Android Support Repository, revision 24 Installed Android Support Repository, revision 24 Installing Google Repository, revision 22 Installed Google Repository, revision 22 Installing Intel x86 Emulator Accelerator (HAXM installer), revision 5.5.0 Installed Intel x86 Emulator Accelerator (HAXM installer), revision 5.5.0 Installing Android SDK Platform-tools, revision 23.0.1 Stopping ADB server failed (code -1). Installed Android SDK Platform-tools, revision 23.0.1 Installing Sources for Android SDK, API 23, revision 1 Installed Sources for Android SDK, API 23, revision 1 Installing Android SDK Tools, revision 24.4.0 Installed Android SDK Tools, revision 24.4.0 Stopping ADB server succeeded. Starting ADB server succeeded. Done. 8 packages installed. Android SDK is up to date. Running Intel® HAXM installer |
进入项目选择页面,默认没有项目:
选择要导入的项目:
然后就可以导入,可以正常打开项目了:
另外,也去看了看,对应的android Studio的目录:
/Users/crifan/Library/Android/sdk/
licrifandeMacBook-Pro:~ crifan$ ls -l /Users/crifan/Library/Android/sdk/ total 8 -rw-r--r-- 1 crifan staff 1158 10 20 10:46 SDK Readme.txt drwxr-xr-x 2 crifan staff 68 10 20 10:46 add-ons drwxr-xr-x 3 crifan staff 102 10 20 10:47 build-tools drwxr-xr-x 5 crifan staff 170 10 20 10:48 extras drwxr-xr-x 13 crifan staff 442 10 20 10:48 platform-tools drwxr-xr-x 3 crifan staff 102 10 20 10:46 platforms drwxr-xr-x 3 crifan staff 102 10 20 10:48 sources drwxr-xr-x 2 crifan staff 68 10 20 10:48 temp drwxr-xr-x 30 crifan staff 1020 10 20 10:48 tools
暂时就折腾到这里。
转载请注明:在路上 » [记录]mac下安装Android Studio开发环境