8

Whenever I set

android.library.reference.1=G\:Projects\Android\library\core\

in ant.properties, I get the following error while building:

G\:Projects\Android\library\core\ resolve to a path with no project.properties
file for project G:\Projects\Android\library\test

The path is correct, and the folder does contains project.properties file. How do I resolve this issue? Does android build only take in terms of relative path?

HaskellElephant
  • 9,819
  • 4
  • 38
  • 67
Azlam
  • 2,052
  • 3
  • 24
  • 28
  • android.library.reference.1=G:\\Projects\\Android\\library\\core\\, This doesnt work either I am getting android.library.reference.1=G:\\Projects\\Android\\library\\core\\ – Azlam Oct 28 '11 at 06:14

3 Answers3

13

Yeah, it doesn't work with absolute paths -- just use relative, ie the one with lots of ../..

Adinia
  • 3,722
  • 5
  • 40
  • 58
pelotasplus
  • 9,852
  • 1
  • 35
  • 37
  • It doesn't feel like that's the root problem. There must be something else going wrong when you use an absolute path, because Ant converts the relative path into an absolute path before using it. That said, +1 because you're right. – AlbeyAmakiir Jul 09 '12 at 00:56
  • relative paths fixed the problem – omega Nov 28 '12 at 10:21
  • Yeah, this bites me about once a year or so and I totally forget that for some obscure reason it has to be a relative path. I am making this entry so next year I might find my own comment when I am looking for the solution again :) – Travis Jun 01 '13 at 21:55
  • This means you cannot access a library from another drive on Windows. That is, of course because you cannot just go back with ..'s and switch to another drive letter. – Kalen Dec 24 '13 at 17:30
  • symlinks inside the project to absolute paths + relative xml property :-) – Ciro Santilli OurBigBook.com Feb 14 '16 at 22:42
3

Try using Unix style delimitters, '/' not '\' e.g.

workspace.dir=/dev/projects/EclipseIndigo/AndroidWorkTwo

The above line works for me in Windows

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
NickT
  • 23,844
  • 11
  • 78
  • 121
  • It does work with absolute paths. The example I gave is an absolute path, I just didn't include the drive letter. – NickT Oct 28 '11 at 10:17
  • Really helpful. This happens when you work on Windows, but you build it on a mac or linux box :(. – fr4gus May 29 '13 at 17:25
0

Neither of these solutions worked for me. I ended up having to reset the workspace by doing the following.

Preferences - General - Startup and Shutdown - Workspaces

Then I just selected the workspace that was there and removed it. That was the only way I could get it to work. Hope this helps someone else!

Rymnel
  • 4,515
  • 3
  • 27
  • 28