I am very new to Eclipse (Galileo, Eclipse IDE for Java Developers) and working on my first Android app, but have used SVN on many other kinds of projects and development. Last night I took my first crack at pushing the new source into a shared repository (at work) and then pulling it back down at home.
Based on an SO question/answer, I had ignored the bin and gen folders, but added everything else. When I got home, I had hoped it would be as easy as pointing eclipse to the newly downloaded source tree.
I tried setting the workspace (requested when eclipse started) to the precise folder holding all source. Nothing showed up. It was as if I were starting fresh regardless of all the source and files sitting in the workspace folder.
Then I thought maybe I needed to open a "project" file to get things rolling. Opening the .project file yielded the contents of that file in the XML editor of eclipse.
What am I missing here? Is the project metadata not stored in the source tree? Do I have to build project metadata up on every machine that gets a working copy of the source? Is this something wrong with my home Eclipse install? Can someone give me an overview of how they (successfully) do this?
You should be able to do it like you tried. Make sure you have the Android Development Tools (android eclipse plugin) installed along with the android SDK and make sure you set up ADT before you open the project.
Not checking in the bin directory makes sense to me, but I do check in the gen folder and don't have any problems.
Here is what I do to open a project from SVN if the source is already on the machine:
Open eclipse
Click on File->Import
Select General->Existing Projects into Workspace
Or you can also do this:
Open Eclipse
File -> Import
Select SVN -> Checkout Projects from SVN
Follow the steps to get from SVN
Related
A plug-in that I want to install (Eclipse Jubula Database Drivers) is only available in Eclipse Marketplace. However, I need to install it to an Eclipse package running in a machine that is not connected to the Internet. Is any way to get the update site address so I can download the files for offline installation? This answer solves the problem to download an update site, but I don't see a way to get the update site address from eclipse marketplace
On every plugin page of Eclipse Marketplace, use the rightmost icon underneath the "Install" button. That opens an overlay containing the URL of the update site.
Yes. After spending a couple of weeks, I found this simple process:
Unpack Eclipse in folder A
Unpack Eclipse in folder B
Start Eclipse in folder A
Install the plug-in
Delete all files in the folder plugins/ which are the same in both Eclipse installs.
Delete all files in the folder features/ which are the same in both Eclipse installs.
That leaves you with the files necessary to run the plugin. But since this isn't an update site anymore, you can't easily install the plugin.
To solve this problem, you have two options:
Put the files into the dropins/ folder
Create an update site using the files which you identified. Good luck with that. I tried it for months but the result was unstable at best ("Component can't be installed because ...").
Just to follow up on Aaron's answer, the relevant files from plugins/ and features/ go into a new folder eclipse/ which can then be put into the dropins/ folder.
So for a concrete example, I wanted to install the Jenerate plugin to an offline machine. At the time I tried this, the update site was offline. So I went ahead and installed it via Marketplace on another machine with internet access, which lead to the creation of a folder features/org.jenerate.feature_1.0.2 as well as a jar plugins/org.jenerate_1.0.2.jar. I put those into newly created directories on the offline machine in dropins/jenerate/eclipse/features and dropins/jenerate/eclipse/plugins, respectively. See also this Eclipse help document.
I am using Android SDK Tools 23.0.2 with Android API 20 (L preview).
I have been having this error for some time:
parseSdkContent failed
.androidjava.lang.ExceptionInInitializerError
and I have looked at many other similar questions and tried their solutions to no avail.
They recommended deleting the /.android file in the user directory where my workspace is saved and restarting Eclipse. However this did not work for me.
parseSdkContent failed Could not initialize class android.graphics.Typeface
Android SDK Content Loader failing with NullPointerException
This error seems to be affecting my java code's ability to recognize the XML files it references. When I reference variables to components in the XML file, it does not recognize its existence, even though everything seems to be set up correctly.
Please let me know if any more information is needed.
I'd add a comment, but my rep isn't high enough...
Anyway, deleting .android folder worked for me. Your wording suggests you deleted then restarted Eclipse. Try:
Stop/Exit out of Eclipse
Delete .android
Restart Eclipse
I was using the 64 bit version of Eclipse ADT from this link https://dl.google.com/android/adt/adt-bundle-windows-x86_64-20140702.zip
and it was giving me issues on Windows 7 64 bit
I have now downloaded 32 bit version of Eclipse ADT from this link https://dl.google.com/android/adt/adt-bundle-windows-x86-20140702.zip
and now its working perfectly.
It might help others too.
I used the "switch workspace" option and created a completely new workspace. This new workspace gives me no problems.
I'd add a comment, but my rep isn't high enough... (just copied and paste here)
I was in the same problem and using Eclipse Luna + ADT Plugin, what I did was:
Exit Eclipse.
Delete .android folder from my home directory.
Delete .metadata folder from my workspace directory.
Also in my workspace deleted a folder called .remote (I don't remember exactly what was it's name, just deleted it).
Open eclipse, complete the ADT dialog, setup the Android SDK path, and check for eclipse updates.
If updates were done better you restart Eclipse before continuing.
Import my existing projects, (or create a new one).
Open a layout file (xml) to see if the error is gone.
Good luck!
I have a repository in which I have a simple ant project (only the src directory and the build.xml file). I did a checkout of this project in a local copy. Then I opened Eclipse, created a "Java Project from existing Ant build file" and it worked fine. I can build, clean, run, generate javadocs, etc. However, my problem is that the source files in the packages, as well as the project itself, doesn't appear to be under version control in Eclipse. I can work with it fine from Cygwin, but not from the GUI.
The odd thing is that I have several regular Java projects, on the same repository which are synced fine by Eclipse, so it's not a version issue.
When I created the projects that work, I had to go to Team->Share Project... and Eclipse told me that they were already under version control and updated its configuration. However, in this current case, this isn't working. Any suggestion please?
EDIT:
I'm using svn 1.8.
UPDATE: I tried creating a regular Java project, and this time the version control looks fine, so it appears it's an issue related only to Java Project from Existing Ant build file.
The problem is that Eclipse doesn't know your project is using Subversion as a version control tool. You did a checkout outside of Eclipse, then you set up Eclipse as if this was a non-version controlled project.
To get Eclipse to recognize the project as under Subversion, you need to let Eclipse know. This means you should have said "File->New->Project, and select SVN->Checkout Project from SVN in the new project wizard. Then, Eclipse would have checked the project out in Subversion for you, and Eclipse would understand this project is in Subversion.
Unfortunately, I am not quite familiar enough with Eclipse to know how to tell Eclipse that the current project is really under version control. The best I could come up with was:
Right-click on the project and select Team->Share
Say this is a Subversion project you want to share.
Select the Repository to use
Select the folder where you want this project, and select the current folder.
You get the following warning:
Warning: The specified folder already exists in the repository. If you continue, that folder will be checked out to the existing location. Do you want to continue?
Your project will now be "checked out" over your current project. Everything should be okay because the files you have either match what is in Subversion or are modified versions of what is in Subversion.
You will be then asked to use the Synchronized view. Check "Yes", and then switch back to the Java view. Eclipse will now know your project is under Subversion and everything should work fine.
Note the use of Shoulds and Coulds. This is my way of saying that the advise given is done on an "as is" basis and I am not responsible for any damage done by following this advice, so please don't sue me.
It's basically your standard open source license.
I have that problem:
I checkout folder (myFolder for example) using tortoise svn.
import->existing projects into workspace
after it eclipse found a lot of projects(about 50) from different locations of myFolder.
BUT
eclipse doesn't understand that these projects from svn(no svn menu if make right click on any file and select team submenu)
I attempt to import-> team project set but after it in eclipse I see myfolder only. it is just folder - not projects. I cannot to compile it and use other features.
I think you are understand my problem.
Can you help me?
Make sure you have installed a subversion plugin for eclipse which is is compatible with the version you have for tortoise, i.e the eclipse plugin you actually have - if any - is able to read the .svn meta data which was created by the tortoise client. This can happen for example if eclipse plugin is 1.6 and tortoise client is 1.7 or above.
When eclipse shows the ~50 projects deselect all and select only the one(s) you want to import, when passed a folder for importing an existing project, eclipse searches recursively for all folders containing a .project file and displays them as projects to be imported. Make a refresh (F5).
EDIT
From http://tortoisesvn.net/tsvn_1.8_releasenotes.html#compatibility
Local Client Compatibility
Subversion working copies are sometimes accessed using several different clients, e.g. TortoiseSVN, AnkhSVN, and the svn command line client. Because the working copy format has changed with this release, 1.8 clients cannot access an earlier working copy without first upgrading it. Pre-1.8 clients cannot access 1.8 working copies at all and there is no downgrade option
Please upgrade your eclipse svn-kit to the latest version, use this update site.
If you have already checkout your projects, import them in eclipse then follow below steps.
Right click on your project go to Team --> Share Project --> Select Repository type. Do next fill in required information and it should work.
I'm trying to share a project between my desktop and laptop using Subversion. The project has 3 modules. I've imported the project folder into a repository in a shared folder that my laptop can access over the network.
I checked the project out on my laptop and then tried to open the project. None of the modules are visible, only the project's .iml file, as in the screenshot below.
I notice that the .iml file has a line for "content url", which refers to a location on my desktop. Maybe this is the problem. What can I do about it? Do I have to create a new project on the laptop and import the modules - so there would be 2 different top level .iml files, one for the desktop and one for the laptop? Am I going about this the wrong way?
UPDATE: The problem seems to be with committing. When I make a change in a file, save, and hit Commit Changes, I get a popup saying "No changes detected". This is the same on both laptop and desktop, and meant that I downloaded the wrong version onto my laptop before. I deleted the repository and created a new one, and my project works on my laptop now, but I can't commit changes from within IntelliJ (only with TortoiseSVN via file manager). Also, when I imported my project into version control from my desktop computer, the working copy wasn't put under version control. So I can't update from my desktop unless I check it out to a different folder.
I think there is something wrong with the SVN plugin with this version of IntelliJ (10.5.1). Does anyone else have problems with committing changes?
RESOLUTION I needed to
1) Update Settings | Version Control to map Subversion to the working directory
2) Import into Version Control
3) Check it out again
It may possibly have been caused by the fact that the modules were originally standalone projects which were in separate repositories. Whatever the cause, IntelliJ's "No changes detected" dialog isn't the most helpful.
VCS -> Refresh File Status solved this for me, when Intellij suddenly stopped noticing changes.
Please refer to the FAQ.
As for the content root, make sure that it's located under the project root or module root, in this case the path will be stored relatively to the project/modile root inside the iml file. If the fixed system specific path is used in the iml, such module will not work on other systems.
UPDATE:
Make an explicit mapping between the actual working directory and Subversion in Settings | Version Control dialog. If you are using the default placeholder and your project files are not under the checkout root, it could be the case.
After performing the initial import you need to do a checkout in order to use version control in IDEA.
Sometimes doing VCS -> Refresh File Status works for me.
Other times, it does nothing.
A solution is to
COPY all your file contents to clipboard / external notepad (for backup)
Choose Rollback on the file which needs updating. Now it is up-to-date with the server and does not contain your new changes.
Edit file again (checkout), and PASTE your original file contents.
Attempt to commit changes. It should detect them now.
I just ran into this today- checked out an existing project and had to update the SVN scheme from 1.6 (I think) to 1.8. That seemed to make Subversion not recognize that it was wrong it its belief- even though I could DIFF and see changes relative to the latest repository version- that "No Changes Detected."
I got so fed up that I shut down Intellij...on a whim I reopened it, and the file in question appeared blue...hmmm...yep, now it detected the changes.
I had the same issue it seems it may have been caused by having a file with the same name in two different GIT-repositories.
I was able to fix it by opening File -> Settings -> Version Control and then un-assigning and re-assigning GIT as the VCS of the two directories which both had the file. First the directory in which there was no changes in the file then the other active one which did have changes (but which did not detect them before).
I got into the similar issue today and I tried VCS -> Refresh File Status, but it didn't help me. When i looked at Version Control->Subversion Working Copies Information, i found an svn error The working copy at /home/project is too old to work with svn client 1.9.4. First i ran svn upgrade and then doing VCS -> Refresh File Status resolved my issue and i was able to commit my changes.
None of the other solutions here helped me.
Ended up checking out the entire repository again, copied all the sub folders over to the newly checked out folder and submitted the changes.
Deleted the old folder and renamed the new folder to the old folders name.