无法在我的应用程序项目中引用 LVL Android 库
我正在按照 http://developer.android.com/guide/publishing 中找到的说明进行操作/licensing.html
我制作了
我已经检查了 market_licensing 项目 android 属性中的“is Library”框。 我已将该项目作为库项目添加到我的应用程序项目中。它显示在列表中并带有绿色复选标记。
当我保存项目设置并重建时,编译器找不到 LVL 项目中的类,当我返回应用程序的项目设置时,库列表中的条目现在有一个红色 X,而不是绿色复选标记。
我不明白我做错了什么,这阻止了我引用 LVL 项目。有什么帮助吗?
编辑:我尝试将许可项目添加到我的应用程序项目的构建路径中,然后我能够构建,但是当我尝试运行应用程序时崩溃,因为它找不到任何库代码。很明显,许可项目的“库”状态未正确设置和/或在构建时未自动注入到我的应用程序项目中。
I'm following the instructions found at http://developer.android.com/guide/publishing/licensing.html
I made a copy of the <sdk>/market_licensing directory, then using the New Project Wizard in Eclipse I created a new Android project from Existing source and pointed it at the library subdirectory in my copy of market_licensing.
I've checked the "is Library" box in the market_licensing project android properties.
I've added that project as a library project in my app project. It shows up in the list with a green checkmark.
When I save the project settings and rebuild, the compiler can't find the classes in the LVL project and when I go back into my app's project settings the entry in the libraries list now has a red X instead of the green checkmark.
I don't understand what I'm doing wrong which is preventing me from referencing the LVL project. Any help?
EDIT: I've tried adding the licensing project to my build path for my app project and then I'm able to build, but when I try to run the app crashes because it can't find any of the library code. So clearly the "library" status of the licensing project is not set up correctly and/or its not being automatically injected into my app project on build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发布了一个类似的问题,当我这样做时,我意识到问题是什么 - 请参阅此处 在eclipse中,无法引用另一个android项目中的android库项目
I was posting up a similar question and as I did so realised what the problem was - see here In eclipse, unable to reference an android library project in another android project