SamIAmHarris
SamIAmHarris

Reputation: 2178

Cloning down existing Android Studio project

I have been working on a local machine and pushing my changes up to Stash (Pretty much BitBucket).

Everything has been going fine but not I am trying to clone the code down to a co-workers machine and am having some serious issues with Android Studio.

I am importing the project through vcs, choosing git option, and providing the URL.

Whenever we try to get the project running we run into build problems and Gradle not working properly. The project is not initially shown as an Android project and we have to configure the framework. Then we have gradle saying it cannot find 'com.android.application' file. I have ensured that I have the correct Gradle version to work.

I think that I may not be pushing up the correct files to Stash, so when we clone the project it does not have enough information to build properly.

The files that I have not pushed up are the following:

build.gradle (at highest level not app level)
gradle.properties
gradlew
gradlew.bat
NAMEOFAPP.iml
.idea/.name
.idea/encodings.xml
.idea/gradle.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
.idea/copyright/profiles_settings.xml
.idea/dictionaries/USERNAME.xml
.idea/scope/scope_settings.xml
app/app.iml
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.properties

Upvotes: 1

Views: 2130

Answers (1)

emerssso
emerssso

Reputation: 2386

You definitely want to push up build.gradle. That is the file that describes the Gradle build for the project.

You will also want the .iml files pushed up, and the gradlew files (which are gradle scripts for different platforms), and probably the gradle/wrapper files.

You do not have to push up the .idea files. They specify the AS/IntelliJ workspace settings. It can be convenient to share these between collaborators as you will all be in the same environment, but it can also be frustrating having other people overwrite your preferred settings, so this is up to the developers in question.

Upvotes: 1

Related Questions