I am creating an Android Application with a team of others. Typically I use netbeans, and I have never had trouble with netbeans or svn. But as eclipse has the android plugins, we are using eclipse.
What I need to do is check in my current a android application, so that then my team members can all check it out(as an android project) and continue to develop and test on their own computers.
Current when we check out a project from SVN, eclipse does not recognized the project as an android project.
I recently had this problem too. The thing is that the ".project" file was not imported in SVN; because of this Eclipse will add a new ".project" file whenever and however you check out the project from SVN; the other part of the problem is the poorly designed "Android Project from Existing Code" option.
Solution:
- delete the .project file from your working copy
- ["optional"] move the project folder somewhere else (because the "Android Project from Existing Code" option will not work if you try to create the project in the same place)
- create new project and select "Android Project from Existing Code"
After creating the project commit the newly generated .project file to SVN; this way the others will be able to simply click "Check Out" and start working :)
Note: Make sure to also commit the other android related files (e.g. project.properties)
Related
my tries
click right at my project , choose Export ---> android
---> Generate Gradle build files
I stop in this point , I cant force overriding, any one know the reason
The Eclipse IDE uses a different file structure for their android projects, as opposed to the files structure of the projects created through Android Studio. Regardless of the Gradle builds and so on.
Your best bet would be to create a new Android Project based on the specifications of your Eclipse project. And migrate the source code as required. As far as the libraries are concerned, you can add them directly to the Android Project.
I also found that this might be useful for your current situation. Help on Migrating from Eclipse to Android Studio (Projects).
Hope this helps.
Im new in android programming and wounder, how do make a copy of your android project in Android Studio?
I would like to save my project as a new version of my project for backup purpose. I tried just make a copy of the project in the finder and open the copied projectversion in Android Studio but it just seem to point to my old projectversion, not the new one.
How do I manage this simple and basic task?
I believe this is down to the workspace files in the .idea folder keeping absolute paths as I noticed this phenomenon when attempting to move a project.
Solution
When you have copied (or moved) the project, do not open with "Open an existing Android Studio Project", but instead open with "Import Non-Android Studio project" and select the main build.gradle file. This will fix the paths in the workspace.
I am not a dev, but have some dev experience. I have never used Android Studio before but I wanted to look at an example app. I picked one I am very interested in, but it gives me nothing but grief just trying to import it.
https://github.com/AltBeacon/android-beacon-library-reference
Notes:
I am using the latest version of Android Studio. (1.0.2). I have added in all the SDK files needed I think.
I have downloaded and un-zipped Gradle 2.2.1.
I am running Ubuntu 14.04.
I have dealt with Eclipse for Android previously and was able to
hack someone else's code to suit my needs and actually deploy an unsigned apk.
The readme/install directions at the github don't really help a noob
like me.
Install:
I have extracted the project from the Download Zip link.
For the actual import into Android Studio I choose "Open an Existing
Android Studio Project" - because it looks like one.
I then choose the root directory created by unzipping the zip file,
in this case it is named "android-beacon-library-reference-master".
But it seems to select the project's Gradle subfolder (/gradle) for the project! Which I'm quite certain is invalid. I cannot seem to get it to use the root
folder.
What am I missing? Or is this not the correct way to "import" this particular app? Is this app not compatible with AS 1.0.2?.
TIA!
In Android Studio, close any projects currently open. You should see the Welcome to Android Studio window.
1.Click Import Non-Android Studio project.
2.Locate the project you exported from Github, expand it, select the build.gradle file and click OK.
3.In the following dialog, leave Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)
Android Studio properly updates the project structure and creates the appropriate Gradle build file.
Can you try "Import Project" instead "Open Project". Thanks.
I installed Android Studio and followed the export instructions laid out at d.android.com on how to move existing Android Applications over to Android Studio. I made the mistake of thinking that I would be able to use both editors for my projects. What would be the easiest way to move all of my projects and libraries back to eclipse? As of right now, my eclipse workspace comes up empty. Thanks
you can use both at the same time but you need to do some extra work by using version control (for example git). An example of how this might work:
You make an empty project in Git. You then clon your git project to local. In the local folder you create your new Android project. You then make a .gitignore where you ignore all eclipse related files/folders. Now you can publish your project to git. Then you clone your git project to a new folder, this is where you studio edition is going to go. You then make a new .gitignore in the new folder for the studio related files/folders.
Now you have version control and you can use both Eclipse and Studio.
I am having a weird problem with Eclipse.
Some days back, I completed a project with the name IntelligentAlarm, and then pushed it to github. I was using Eclipse Indigo then. After that I formatted the system, and downloaded Eclipse Juno. I cloned this repository from github, and imported this project into Eclipse as an android application.
But now, I am unable to run it as an android application. The option which allows you to run it as an android application is missing. Neither can I create a new Run Configuration for this project, as I don't see this project in Browse window.
I should add that I am able to run newly created android projects.
What should I do ?
If you formatted your hard disk your workspace is gone. This means you have to import your cloned project into Eclipse (Import existing Android project into workspace). This adds your project to the newly created workspace. After that, if will be shown in your IDE as usual.
It might be that you have still some things to do, for instance downloading the SDK platforms and creating an emulator.
After this you should be able to run your program as an Android project.
I would re-do the android app setup configuration in Eclipse again and see if the
Run > As an Android App
option comes back.
Setup Eclipse form scratch to enable Android Development Environment. enter link description here
Then create new project from your existing code. Since you exisitng eclipse project will have the properly files it will enable any old properties.
Hope you have your old workspace.
Quick Solution: *You can try deleting the .metadata folder under workspace folder which can recreate the .metadata folder for you when restart the eclipse*