在Eclipse中,无法引用一个Android库项目在其他Android项目 [英] In eclipse, unable to reference an android library project in another android project

查看:141
本文介绍了在Eclipse中,无法引用一个Android库项目在其他Android项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我写了这个问题,我设法解决它,所以它在这里重复了他人的利益。这是最初的问题:

As I was writing up this question I managed to solve it so repeat it here for the benefit of others. Here is the initial problem:

我创建,我想在另一个项目中引用一个非常简单的库项目。我已经没有问题,所以真的不知道为什么它不工作这一次做到了这一点previously。我有:

I have created a very simple library project which I want to reference in another project. I have done this previously with no problems so not really sure why it is not working this time. I have:

  1. 已标记通过项目属性库项目。该 default.properties 文件有这一套: android.library = TRUE

在我的其他项目中添加引用通过项目属性我的库项目。该 default.properties 文件具有增加预期,即 android.library.reference.1 = K参考:/ android_test_ws / applicationRegistrar

In my other project added reference to my library project via project properties. The default.properties file has the reference added as expected ie android.library.reference.1=K:/android_test_ws/applicationRegistrar

对引用的库项目中的绿色对勾开始了绿色,然后变成了红色十字架。

The green tick against the referenced library project starts off green and then changes to a red cross.

这意味着,必须有一些错误/从库项目中失踪,但我不知道是什么。在此之际我库项目是远远超过了previous一个我创建的简单。

This implies that there must be something wrong / missing from the library project but I don't know what. My library project on this occasion is MUCH simpler than the previous one I created.

推荐答案

确定这里是我发现的时候我一直在寻找的参考项目(而不是库)在我的文件系统的default.properies文件的解决方案。虽然参考项目是在同一个Eclipse工作区的库项目,实际的文件是其他地方在文件系统中,即它们在库项目的父文件​​夹相同were'nt。当我把引用的项目在同一个物理文件夹中的库项目这一切都很好。

OK Here is the solution which I found when I was looking for the default.properies file of the referencing project (not the library) in my file system. Although the referencing project was in the same eclipse workspace as the library project, the actual files were somewhere else in the file system ie they were'nt in the same parent folder of the library project. As soon as I placed the referencing project in the same physical folder as the library project it all went fine.

我想,这一定有什么做用蚂蚁在背后机器人。

I guess that this must be something to do with android using ant underneath the covers.

编辑:项目名称必须符合文件系统上的文件夹名称。你所看到的项目属性 - 什么> Android->库参考是一个相对文件系统路径。

The project name needs match the folder name on the file system. What you are seeing in the Project Properties->Android->Library Reference is a relative file system path.

这篇关于在Eclipse中,无法引用一个Android库项目在其他Android项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆