8

I'm using Eclipse 4.5 with m2e 1.6.1.20150625-2338, ADT 23.0.3.1327240, Android for Maven Eclipse 1.1.0, and 23.0.6.1720515. I have an Android project marked as "Is Library":

If I do a Maven|Update Project... on the project, the .classpath is modified to contain the following:

<classpathentry kind="output" path="target/classes"/>

But then when I build the project, Eclipse changes that line to:

<classpathentry kind="output" path="bin/classes"/>

Apparently there is a disconnect between what Eclipse thinks the classpath should be and what m2e thinks it should be. Obviously this does havoc for my Subversion files.

Is there some setting that will get m2e and Eclipse to agree on the classpath and not modify it?

Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
  • You have more than one java version in our machine?? – DJhon Aug 08 '14 at 04:19
  • can you post your `.project` and `.classpath` file in question – jmj Aug 08 '14 at 05:09
  • I'll do better than that: you can download the whole shebang from https://svn.globalmentor.com/java/trunk/globalmentor-android/ . – Garret Wilson Aug 10 '14 at 16:17
  • I see an *empty tag* and *container tag* of both `classpathentry`. Is that normal? – mr5 Aug 12 '14 at 09:55
  • So I put a 100 bounty on this question, yet no one has even verified whether they reduced this issue or not. Instead, people have thrown out random suggestions which they themselves haven't even tested. Is it because my bounty was too low? – Garret Wilson Aug 15 '14 at 13:30
  • @GarretWilson Can you please re-word the question? The problem is it reads like a rant. We can't tell you *What the Sam Hill is going on?* or *How can Google put out such a brittle toolkit?* I can guess. You have a dependency that is bringing in a too recent adt. – Elliott Frisch Aug 17 '14 at 04:58
  • @ElliottFrisch, fair enough --- that paragraph was a rant. I've edited the question for those who got confused by the "Sam Hill" part (a colloquialism of the middle United States) or got sidetracked by my irritation at Google. – Garret Wilson Aug 23 '14 at 02:59
  • I've put this on hold because it seems like we don't have enough information to resolve it. That said, I doubt we could even *get enough* to solve it. That's quite possibly not your fault. And no; I doubt a higher bounty would help. – Andrew Barber Aug 23 '14 at 18:24
  • @AndrewBarber, I note that I had included a link to the entire source code for someone to try to replicate this. But no matter; the situation has changed (and simplified) somewhat after an upgrade to eclipse 4.4.1RC2 and some plugins. It still behaves oddly and I believe incorrectly. Hopefully my revised and simplified description and questions will now be deemed on-topic. Thanks. – Garret Wilson Aug 31 '14 at 17:06

2 Answers2

2

I might have been too broad the first time so here is what you can do:

Either downgrade your environment back to 4.3 (this is annoying and you have complained about it.)

Or check what version your project is set to. If it is set to android 4.4, try setting the project version to 4.3 or the version your app was working on before you went to 4.4 and it will work (unless something is different with your apps than my apps which is possible.)

Tarz
  • 31
  • 10
  • Not a chance. I'm not wasting a whole day to downgrade to something I'm not going use. "Downgrade your development environment" is not a valid option. But you can try it if you want, and tell me what you see. – Garret Wilson Aug 12 '14 at 22:20
  • Would it help if I raised the bounty? – Garret Wilson Aug 13 '14 at 00:02
  • 1
    It only takes 25 minutes.... I did it before you don't need to downgrade the whole application just the folder holding the app that has problems – Tarz Aug 13 '14 at 18:34
  • That's why I got my apps working. Next time please read answers more carefully. – Tarz Aug 15 '14 at 23:55
  • I'm sure I could get my apps working by switching to NetBeans as well. But the trick here is to stay with the latest version of Eclipse and the version of Android I'm using, and not downgrade either of them. I'm trying to find the root of the problem, not sidestep the problem by downgrading or switching IDEs. But thanks anyway. – Garret Wilson Aug 31 '14 at 17:09
1

See this page Build path incomplete only in some workspaces (Android) .

It may help you to resolve this "The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project " problem. -Aravindan.

Community
  • 1
  • 1
Aravindan K
  • 101
  • 3
  • 18
  • But that does nothing to explain why m2e keeps changing my classpath---in fact, changing it back and forth between two different values! – Garret Wilson Aug 15 '14 at 13:28
  • Note that an error message no longer appears. I've updated my question to reflect the core remaining issue, that of the mysteriously changing classpaths. – Garret Wilson Aug 31 '14 at 17:10