android_asset不工作的蜂窝? [英] android_asset not working on Honeycomb?

查看:246
本文介绍了android_asset不工作的蜂窝?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示包含在资产文件夹偶尔静态网页航运Android应用程序。我一直在显示这些编程方式,如:

I have a shipping Android application that displays occasional static webpages that are included in the assets folder. I have been displaying these programmatically like:

webView = new WebView(PKBDocument.KnowledgeBook.KBContext);
setContentView(webView);
webView.loadUrl("file:///android_asset/path/to the/file.html");

这很好地满足API等级3 - 9。我刚刚收到了我崭新的Xoom,并试图运行相同的应用程序,我得到一个错误

This works fine for API levels 3 - 9. I just recently received my shiny new Xoom and tried running the same app, and I get an error

在文件的网页:///android_asset/path/to%20the/file.html可能暂时无法连接,或者它已永久性地移动到了新网址

于是,我开始尝试。蜂窝仿真器将显示这些网页就好了,但我的实际蜂窝设备(运行3.0.1)持续显示此错误。我可以读AssetManager网页,然后用显示它 loadDataWithBaseURL(),但随后在网页中的图片链接不加载(presumably因为它可以'吨找到的路径的图像文件)。

So, I started experimenting. The Honeycomb emulator displays these pages just fine, but my actual honeycomb device (running 3.0.1) consistently displays this error. I can read the webpage with AssetManager and then display it using loadDataWithBaseURL(), but then the image links in the web page don't load (presumably because it can't find the path to the image file).

任何想法变了,该如何处理呢?

Any idea what changed, and how to handle this?

推荐答案

尝试删除的空间。 该项目和的这个项目无论做工精细我的XOOM。

Try removing the space. This project and this project both work fine on my XOOM.

这篇关于android_asset不工作的蜂窝?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆