使用 MapActivity 在 Android 中创建库项目并在另一个项目中使用它?
我创建了一个项目作为使用 MapActivity 的库,但是当在另一个项目中引用它时,它无法与该项目链接。但如果同一个项目仅与 Activity 一起使用,则一切正常。该项目已正确链接,并且库的活动从其他项目调用。
logcat 中显示的错误是无法解析 packagename/SampleLibActivity 的超类; (13)
我真的不明白仅在使用MapActivity扩展时出错的原因。创建库项目有什么限制吗?
I have created a project as library that uses MapActivity but when it is referenced in another project it cannot link with that project. But if the same project is used with only Activity then everything works properly. The project is linked properly and the activity of the library gets called from other project.
The error that shows up in the logcat is Unable to resolve superclass of packagename/SampleLibActivity; (13)
I really do not understand the reason of error only when extending with MapActivity. Are there any limitations with creating library project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是否在新项目中添加了从谷歌地图生成的密钥?
Have add the key generated from google maps in the new project?
我犯了一个愚蠢的错误,没有在应用程序标签中包含使用库。
希望这也对其他人有帮助。
I did a silly mistake of not including uses-library inside application tag.
Hope this helps out someone else too.