1

I am trying to transfer my Android Studio project from my Windows computer over to a Mac.

I am going into my Android Studio Projects, selecting the entire folder "MyApplication", and then copying to an external hard drive.

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.

Then I get this error:

Sync Android SDKs

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.

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.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Jeff Padgett
  • 2,380
  • 22
  • 34
  • You can't sync your SDK path. Mac and Windows have different file patterns... You should never copy your gradle properties file between computers (for example, don't commit it to Git either) – OneCricketeer Jun 27 '18 at 00:17

5 Answers5

3

At the very least, you only need

app/
    src/
    build.gradle
build.gradle 
settings.gradle

You can keep the gradlew files, or you can install Gradle separately

If you have a local.properties, you must install Android SDK separately on the second machine, then point the sdk.dir property to that

As far as transferring projects, I recommend using Git rather than external hard drives

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
1

Android Studio > File > Export to Zip File...

and that's it... unzip the file over at MACOS and open with Android Studio.

Mohsin Falak
  • 429
  • 6
  • 22
0

You have to get the settings for your project. For this, you can 'Export Settings' from Android studio in Windows and 'Import Settings' in Mac. A similar type of question is answered.

Check this out: Moving Android Studio Projects and Configurations from Windows 7 to OS X

Delegate
  • 65
  • 2
  • 10
0

go and find the place where your project is stored right click on the project and then create a zip folder for it, and then move the zip folder to a mac and unzip it, this is the best way and the most used way

Sapien_Knight
  • 244
  • 3
  • 14
0

I did a Mac finder search on "c:\" on a project imported from Window, and found a file named build-info.xml, that I renamed (temporarily in my mind) build-info-ko.xml ... and then everything went fine, I was able to Run, install APP (which initially failed, before the rename) and launch. (of course, using Mac own local Android SDK, ignoring the initial path with c:\ )