How do I properly import a project to Android Studio from github?
When I attempt to import the projects from github that is about a year old, I would get errors, and not have a functional project.
https://github.com/baseball435/SpaceInvaders
If I import the project above,
I get this message:
In addition, I get an awkward structure :
To import into Android Studio, select File > Import, and then select the directory containing the project to import. A wizard will open and guide you through the rest of the import process. When the project import has finished, it will open up a file called "import-summary.txt" which lists all the steps taken during import and suggestions for next steps. For example, it may note files that were not migrated, it may note missing components in your SDK install, and so on.
I was successful in importing projects from Github.
I think you should import only the SpaceInvaders-android part.
After import a gradle rebuild is all that is required.
I think this is the Importing github project you need. Just follow the steps.
Install git for Windows
It can be downloaded for free from git-scm.com.
Link git executable to Android Studio
Open Android Studio and got to Settings. In the Setting dialog open the page Version Control / Git. Here define the path to the git executable you have just installed.
Get the Path to your Repository from Github
Go to the GitHub page and get the HTTPs path to your repository.
Import the Git project to Android Studio
Go to Android Studio and go to Menu / VCS / Checkout from Version Control / Git
Related
I'm a newer in Android and i wish to import this project to my android studio.
How to do it?
Read this full document. It will explain in details step by step whats need to be done.
Step 1: Install git for Windows
It can be downloaded for free from git-scm.com.
Most settings available during the installation process should be compatible with Android studio. Just choose the settings you deem the most appropriate.
Step 2: Link git executable to Android Studio
Open Android Studio and got to Settings. In the Setting dialog open the page Version Control / Git. Here define the path to the git executable you have just installed.
Step 3: Get the Path to your Repository from Github
Go to the GitHub page and get the HTTPs path to your repository.
For instance: https://github.com/mxro/WallOfTheWiseAndroid.git
Step 4: Import the Git project to Android Studio
Go to Android Studio and go to Menu / VCS / Checkout from Version Control / Git
Fill in the required information: username, password, url etc
Now the project should be imported to Android Studio and you should be able to commit and push future changes back to GitHub.
In the newest version of android studio (The 1.3 beta) you can go to File -> import Sample
Then you can select the project you wanted. It's under the getting started heading.
I'm trying to migrate from using Eclipse for my Android-project to the new Android Studio, and I'm having an issue related to Gradle.
What I want is for me to push the latest Eclipse-build to Github, and then be able to pull it down in Android Studio, having the latter automatically convert the project to a Gradle-build. If I'm reading the documentation right, the Android Studio import is supposedly able to do this.
When importing, I can choose between "Create project from exisiting sources" or "Import project from external model"
If I choose the first option, the project won't use Gradle (as far as I can see). If I choose the second, it seems to be looking for an already existing gradle buildfile "build.gradle" in my project.
So - Should I download a Gradle-plugin to Eclipse and make a gradle build-file there, or am I doing something wrong in the import?
It seems the only other questions I can find on SO is about importing and Eclipse export or simply how to pull a project from Github in Android Studio.
Thanks :-)
Importing and converting an existing Eclipse project into a Android Studio Gradle project is quite simple :
File -> Import Project (in Android Studio)
Select the manifest of your Eclipse Android project.
Done.
There may be some dependacy management to deal with.
You can also take a look here :
How do you import an Eclipse project into Android Studio now?
How about this:
clone repo to location 1
export from eclipse
import to android studio in location 2
copy the .hg files or whatever's applicable from 1 to 2
commit from location 2 including deleting eclipse files
Now the repo will have the android studio project and not eclipse.
I tried several times to import this git repos into my eclipse and run it as android application, but no success.
Can someone please suggest me how to import it in correct manner.
Please try these things:
Check whether is a same mane project existing in your eclipse work-space?
Restart eclipse and then try the same
Import project as existing android code not as existing project
Steps : Import-> Existing android code into workspace -> Also mark copy into workspace-> Done
If there is not visible option of copy into workspace then probably there is already similar name project into workspace. First delete that and try the same.
Try to Clone in Desktop or Download Zip.
Then from Eclipse, Import > Existing projects into Workspace.
Hope it work.
I'd like to create a custom application which would use 3D navigation. I found the Navit opensource project, which has all functionalities that I need. I checked out the last Navit source code from the repository found here. After downloading the project I wanted to import it into eclipse workspace as described here. But there I ran into a problem, because when I navigate to Android folder, there is no project found, so the import can't be done. I tried importing as "new android project from existing code" as described in the manual. I even tried by manual creation of the project, but with no success. What am I missing?
Thank you for your reply!
Start a new project, pick import SVN
svn co svn://svn.repository.with.navi.code.you.want.to.import
Select C/C++ project
Choose now GNU Autotools(if there is nothing under toolchains install autotools(autoconf,automake/gettext) via your os packagemanager)
Open a terminal, switch to your workspace navit folder and invoke cmake ./
you now have makefile that matches your local setup
In Eclipse, pick "build all" and you should get a binary
Run as application and you your local build should start
In my projects I use some Android Libraries that are hosted on github, for example, facebook android sdk. Until now I downloaded the .zip with the library and added it to my workspace. This made keeping up to date libraries were a tedious job.
I want to use the option "Import > Git" in eclipse to import the Android Projects. And later use "Team > Pull" to obtain the latest versions of these projects. Is that possible? How?
My two principal problems are:
The android project there is not in the root of the repository, and
there is not .project file.
Install Mylyn and the Mylyn Github connector into Eclipse using the update manager or the marketplace client. Afterwards you can use Import -> Git -> From Github and only need to give it the repository name of the github project. That will clone the repository, so you have the files locally on your system (but not yet known as normal projects in the Eclipse workspace).
Independent of using the connector or any other method to clone the github repository, afterwards you need to import the cloned code into the workspace, so that Eclipse knows about it and can manage it as normal Java/Android/whatever projects. This can best be done by opening the git perspective, expanding the repository node and using the context menu "Import projects" on the "working directory" node of the repository. For projects without a .project file, you will want to use the import as new project option.