如何将Android Studio项目从Windows转移到Mac OS X? [英] How to transfer an Android Studio Project from Windows to Mac OS X?
问题描述
我正在尝试将我的Android Studio项目从Windows计算机转移到Mac.
I am trying to transfer my Android Studio project from my Windows computer over to a Mac.
我要进入我的Android Studio项目,选择整个文件夹"MyApplication",然后复制到外部硬盘驱动器.
I am going into my Android Studio Projects, selecting the entire folder "MyApplication", and then copying to an external hard drive.
在Mac上,我尝试在Android Studio上打开文件.
我转到文件">打开...",然后在外部硬盘驱动器上找到我的应用程序文件夹,然后打开.
When I am on the Mac, I try to open the file on Android Studio.
I go to File > Open... and find my application folder on the external hard drive, open.
然后我收到此错误:
同步Android SDK
Sync Android SDKs
路径 'C:\ Users \ Owner \ AppData \ Local \ Android \ Sdk'不属于目录. Android Studio将改用以下Android SDK: "/Users/user/Library/Android/sdk",并将修改项目的local.properties文件.
The path 'C:\Users\Owner\AppData\Local\Android\Sdk' does not belong to a directory. Android Studio will use this Android SDK instead: '/Users/user/Library/Android/sdk' and will modify the project's local.properties file.
我单击确定",没有任何反应.
I click "OK", and nothing happens.
我假设我正在从Windows计算机上传输不必要的本地文件,但是我不知道应该复制哪些文件,将其保留在哪里,在哪里找到它们以及是否有一个简单的过程(例如导出项目).
I assume I am transferring unnecessary local files from my Windows machine, but I don't know which ones I should copy over, which to leave, where to find them, and if there is a simple process for this (like an Export Project).
很抱歉,并非完全是编码问题,但我似乎无法弄清楚,其他答案让我觉得这应该超级简单.
我已经检查了此和
Sorry not exactly a coding question, but I can't seem to figure this out, and other answers make me feel like this should be super easy.
I already checked this and this.
推荐答案
至少,您只需要
app/
src/
build.gradle
build.gradle
settings.gradle
您可以保留gradlew
文件,也可以单独安装Gradle
You can keep the gradlew
files, or you can install Gradle separately
如果您有local.properties
,则必须在第二台计算机上单独安装Android SDK,然后将sdk.dir
属性指向该计算机
If you have a local.properties
, you must install Android SDK separately on the second machine, then point the sdk.dir
property to that
对于传输项目,我建议使用Git而不是外部硬盘驱动器
As far as transferring projects, I recommend using Git rather than external hard drives
这篇关于如何将Android Studio项目从Windows转移到Mac OS X?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!