library resolve to a path with no project.properties file

11,514

Solution 1

I had the same thing happen to me just now. I use both a Windows and Mac to develop with. I watne d to test my project on both platforms. It built just fine on my Windows machine, but broke on my Mac. When I looked at my project.properties in my Android application (not library projects) on the Mac, I saw that my library projects were referenced this way:

android.library.reference.1=LibraryProjects\\my_lib_project

I changed it to the line below, and it worked just fine!

android.library.reference.1=LibraryProjects/my_lib_project

Solution 2

I solved the issue by editing and checking in the project.properties file with the same property: android.library.reference.1=../../buildlibraries/androidlibraries/sherlock/library

I'm not sure why it works. Why would ant care if the property is passed in by Jenkins vs. declared in the project's property file?

Now I have two paths in my project.properties file: one for a local build and one for the build on Jenkins.

Share:
11,514
user2271490
Author by

user2271490

Updated on June 05, 2022

Comments

  • user2271490
    user2271490 almost 2 years

    I'm having trouble building my project with Jenkins and referencing the Sherlock project library.

    I can build the project with ant on my local system. The problem seems to be referencing the Sherlock library on the build server.

    I pass an environment variable to ant with the relative path to the Sherlock library project:

    android.library.reference.1=../../buildlibraries/androidlibraries/sherlock/library
    

    I'm getting this error.

    **BUILD FAILED**
    /SDK/android-sdk-macosx/tools/ant/build.xml:595: 
    The following error occurred while executing this line:
    /SDK/android-sdk-macosx/tools/ant/build.xml:571: 
    ../../buildlibraries/androidlibraries/sherlock/library resolve to a path with 
    no project.properties file for project /Users/Jenkins/buildlibraries/androidlibraries/sherlock/library
    

    I checked and a project.properties file does exist at that location.

    It has these properties:

    android.library=true
    # Project target.
    target=android-14
    
  • Erik B
    Erik B almost 11 years
    where did you add the project.properties file?
  • James Zaghini
    James Zaghini over 10 years
    Thanks for the solution. No idea why you can't pass it in through Jenkins unfortunately :\