git - checkout remote git code into Android Studio imported project with Gradle build -


i've got code imported android studio.

it's got gradle build (which didn't have previously). need git pull. however, given directory structure has changed i'm not sure how go ahead this.

the android studio directory structure under app/src/main looks similar original, e.g.:

android studio

[main]$ ls androidmanifest.xml assets          java            res [main]$ ls java/ license.txt readme.md   com 

the original

$ ls androidmanifest.xml readme.md       res license.txt     assets          src $ ls src/ com 

under com it's pretty similar except reverse domain path different (e.g. com/original , com/new). i.e. seems significant file androidmanifest.xml that's in different location. however, if git pull it's going put androidmanifest.xml in different place , check out com/original on top of com/new.

any suggestions how deal this?

you need reorganize first files in order match target (that current gradle structure)

  • clone repo (anywhere else, not in android project)
  • do relevant git mv, , commit.
  • add latest version:

    cd /path/to/local/clone git --work-tree=/path/to/gradle/project add . git commit -m "import local dev" git push 

(that version difference might have done locally)

then can go android-gradle project, , git pull.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -