osmdroid 入门 - 安装失败?
我是安卓新手。我有一些java知识(不是广泛),并且我已经完成了一些android教程。
我现在正在尝试使用 osmdroid,我只想显示地图。
我正在使用这里的代码: 帮助设置 OSMdroid 库以显示OpenSourceMaps。但是当我尝试运行它(在具有正确 API 级别的虚拟设备上)时,控制台显示:
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556!
[2012-02-03 17:24:06 - osmtest] (null)
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556': EOF
[2012-02-03 17:24:06 - osmtest] com.android.ddmlib.InstallException: EOF
[2012-02-03 17:24:06 - osmtest] Launch canceled!
我仍然发现 logcat 相当混乱。它说:安装了 PID 90 标签“无法在缓存中打开:没有这样的文件或目录”
这里可能有什么问题?我对 avd 做错了什么吗? 如何从 logcat 获取更多有用的信息?
解决方案 我没有在构建路径中包含 slf4j。 :) 因此,对于遇到此问题的其他人,您可以从此处下载 jar: http://www.slf4j.org/安卓/ 然后将其包含在您的构建路径中,就像您对 osmdroid.jar 所做的那样 (即在您的项目中创建一个 lib 文件夹并将 jar 放在那里)
I'm new to android. I have some java knowledge (not extensive), and I've done some of the android tutorials.
I'm trying to use osmdroid at the moment, I just want to get the map to display.
I'm using the code from here: Help setting up OSMdroid library for displaying OpenSourceMaps. But when I try to run it (on a virtual device with the correct API level), the console sayes:
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556!
[2012-02-03 17:24:06 - osmtest] (null)
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556': EOF
[2012-02-03 17:24:06 - osmtest] com.android.ddmlib.InstallException: EOF
[2012-02-03 17:24:06 - osmtest] Launch canceled!
I still find logcat quite confusing. It sayes: PID 90 tag installd 'Couldn't openat cache: No such file or directory'
What could be the problem here? Something I've done wrong with the avd?
How could I get more useful information from logcat?
Solution I hadn't included slf4j in the build path. :)
So for anyone else with this problem, you download the jar from here: http://www.slf4j.org/android/
and then include it in your build path in the same way you did for osmdroid.jar
(ie. create a lib folder in your project and put the jar there)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想将此问题标记为已回答,尽管我最终自己解决了这个问题。
我的项目中没有包含 slf4j。 :)
I want to mark this question as answered, though I solved this myself in the end.
I didn't have slf4j included in my project. :)