" Android的库项目不能上马"?项目、QUOT、Android

2023-09-12 08:31:46 作者:相关漂亮的>>

现在我这个错误信息完全糊涂了:的Andr​​oid库项目不能上马

我仔细检查了构建路径和图书馆,一切似乎都OK,且有观点,但是,当我试图运行我的应用程序的Andr​​oid项目,它失败,表明该消息对问题没有错误。

为什么它的发生任何的解释是AP preciated!

解决方案

从Android的开发者文档的管理项目使用adt:

Setting一个图书馆计划

  

接下来,设置项目的属性,以表明它是一个库项目:

        在 Package Explorer中,用鼠标右键单击该库项目,并选择属性   在属性窗口中,选择Android的属性组在左边,找到库属性的权利。   选择是图书馆复选框,然后点击应用   点击确定以关闭的属性的窗口。   

所以,打开你的项目属性,取消选择是图书馆复选框,然后单击应用,以使您的项目一个正常的Andr​​oid项目(而不是库项目)。

Now I am totally confused by this error message: Android library projects cannot be launched.

如何上传Android库项目的到JCenter

I carefully checked the build path and library, everything seems "OK", and there is no error on Problems view, however, when I tried to run my application as an Android project, it failed and showed that message.

Any explanation for why it's happening is appreciated!

解决方案

From Android's Developer Documentation on Managing Projects from Eclipse with ADT:

Setting up a Library Project

Next, set the project's Properties to indicate that it is a library project:

In the Package Explorer, right-click the library project and select Properties. In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select the "is Library" checkbox and click Apply. Click OK to close the Properties window.

So, open your project properties, un-select the "Is Library" checkbox, and click Apply to make your project a normal Android project (not a library project).