16005

Share Android Studio project between different Windows & Mac machines

Question:

I have an Android Studio project built under Windows, now when I copy all folder to Mac and try to open it in Mac version of Android Studio it prompts for lots of error, most them pointing to a path on Windows machine. How can I modify project so all paths be relative and not machine (or absolute path) dependent?

Answer1:

You shouldn't have to modify anything because the shareable files shouldn't have absolute paths in them at all. Share only the source files and build script files (<strong>build.gradle</strong> and <strong>settings.gradle</strong> and the Gradle wrapper files). Don't share project files (<strong>.iml</strong> files or the <strong>.idea</strong> folder). Don't share the <strong>local.properties</strong> file, which is local to an individual machine.

Recommend

  • TFS Merge Issue with Missing New Files
  • Redirect standard input (read-host) to a Powershell script
  • Accessing the real file name of a symbolic linked file
  • C function pointer type compatibility
  • LibGit2Sharp and Authentication UI
  • Multiple Layouts Previews for Android in Eclipse
  • using pinentry-tty in a bash script (like read)
  • NetBeans doesn't see style.css [duplicate]
  • CSS - how to trim text output?
  • Bootstrap collapse within a foreach loop
  • why 0.1+0.2-0.3= 5.5511151231258E-17 in php [duplicate]
  • Emit new line in Inno Setup preprocessor
  • How to make SASS put relative paths in its output
  • Can you pass an array from javascript to asp.net mvc controller action without using a form?
  • How to autopopulate a field in SugarCRM form
  • Graphics.CopyFromScreen [Web application] + The handle is invalid
  • ADO and msqli connections very slow
  • OOP Javascript - Is “get property” method necessary?
  • Sort List of Strings By Version
  • Handling un-mapped Rest path
  • Paperclip, set path outside of rails root folder
  • Master page gives error
  • javaw.exe and eclipse startup problems
  • script to move all files from one location to another location
  • ILMerge & Keep Assembly Name
  • Deserializing XML into class C#
  • Symfony2: How to get request parameter
  • Redux, normalised entities and lodash merge
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How to include full .NET prerequisite for Wix Burn installer
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Memory offsets in inline assembly
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Checking variable from a different class in C#
  • costura.fody for a dll that references another dll
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How do I use LINQ to get all the Items that have a particular SubItem?