简体   繁体   English

Android库项目

[英]Android library projects

I created a libray android pakage i included a external jar (apache.commons) i marked the project as library. 我创建了一个libray android pakage,其中包括一个外部jar(apache.commons),并将该项目标记为库。

I create a new android project add library under andriod tab add project under source tab build it and it builds fine. 我在andriod选项卡下创建一个新的android项目添加库,在source选项卡下添加项目,将其构建并构建良好。 As soon as i call something out of that class i get a java.lang.NoClassDefFoundError. 一旦我从该类中调用了某些东西,就会得到一个java.lang.NoClassDefFoundError。

What is going on. 到底是怎么回事。 I tried adding uses-library but then i get shared library not found. 我尝试添加uses-library,但随后却找不到共享库。

My permissions is the same as the library project. 我的权限与库项目相同。 There is no activities in library project. 图书馆项目中没有任何活动。

thanks 谢谢

Android Library project are, basically, 'inclusion of the src and res files'. 基本上,Android Library项目是“包含src和res文件”。 Nothing more... So included jar should be included in all the project... 仅此而已...因此,所有项目中都应包含附带的罐子...

At least, it is how I've seen things while working with Android Library Project 至少,这是我在使用Android Library Project时看到的东西

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM