properties文件的路径

properties文件的路径

本文介绍了库解析为没有project.properties文件的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在用Jenkins构建项目和引用Sherlock项目库时遇到了麻烦.

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

我可以在本地系统上使用ant构建项目.问题似乎是在构建服务器上引用了Sherlock库.

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

我将环境变量传递给带有Sherlock库项目的相对路径的ant:

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

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

我收到此错误.

**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

我检查了一下,并且那个位置确实存在一个project.properties文件.

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

它具有以下属性:

android.library=true
# Project target.
target=android-14

推荐答案

我刚才也遇到了同样的事情.我同时使用Windows和Mac进行开发.我想在两个平台上测试我的项目.它在我的Windows机器上运行正常,但在Mac上却坏了.当我在Mac上的Android应用程序(不是库项目)中查看我的project.properties时,我看到我的库项目是通过以下方式引用的:

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

这篇关于库解析为没有project.properties文件的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:02