Android project jar file missing after pushing to github

I added the Google Gson jar file to my Android project by copying and pasting the gson-2.2.4 jar file to the libs folder and then right clicked on the Jar file and then select Build Path > Add to Build Path(I followed this tutorial). Then everything worked fine for me with this jar file, but after pushing to github, when my friends pulling this project, they said that all code relevant to that Gson jar file shows errors. How could I fix this?

  • android studio settings.gradle duplicated, not recognized.
  • Migrating SVN to Android Studio
  • Maintain Android App for Multiple Markets (on Git)
  • Android+Eclipse project sharing via SVN?
  • Import existing Android project in Eclipse: no gen source folder?
  • How should I structure my project to share classes between an Android client application and a JSP server application?
  • Git says: More than one value for the key difftool.vs2012.cmd
  • Easiest or best way to keep in sync a msysgit repository between three internal Windows-based notebooks?
  • How to get change logs from two repositories configured in Jenkins
  • What is the p4 command equivalent to something like git/hg/bzr/svn status? (Hint: not `p4 status`)
  • Git Bash command not found after installing a package
  • is it possible to ignore .gitignore rules in subdirectory?
  • 2 Solutions collect form web for “Android project jar file missing after pushing to github”

    You can create a library project which contains the jar file, and then add this library to your project.

    Create library project in eclipse:
    File->New->Android application project->Next->Check Mark this porject as a library,
    uncheck Create custom launcher icon and Create activity->Finish

    Add the library to your project:
    Right click your project->Properties->Android->Add->Select the library project you created
    ->Apply->OK

    After finishing these two, you should be able to use Gson, and when pushing your project,
    remember to push the library project as well.

    Problem 1 : Jar doesnt exist. You probably forgot to add, commit and push your changes to github after adding the jar.

    Problem 2 : Jar exists but unrecognised. Ask your friends to remove the existing library from java build path using project properties and add again.

    Git Baby is a git and github fan, let's start git clone.