如何创建链接到内部资产WWW在android文件夹,? [英] How to create link to www inside assets folder in android?

查看:205
本文介绍了如何创建链接到内部资产WWW在android文件夹,?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发iPhone和Android基于手机应用的差距。我有我的web应用程序文件www文件夹(使用CSS,HTML5,JS开发的UI界面)。我想有两个iPhone和Android常见的WWW所以我把iPhone和Android项目之外的文件夹WWW在我的文件系统,并配置了X code到有一个链接到这一点。对于iPhone是可以正常使用。 Android中的情​​况下,我需要在资产项下该文件夹。如果www文件夹在里面的资产复制它工作正常。但如果我尝试给内部资产到www我的项目的链接工作。它抛出错误未找到/www/index.html文件。有人可以帮我解决这种情况。所以,我保持在一个地方www和我的iPhone和Android都指的是同一个文件夹中。

I developing a phone gap based app for iPhone and Android. i have my web app files(UI screens developed using CSS, HTML5, JS) in www folder. i want to have a common www for both iPhone and Android so i placed the folder www outside iPhone and Android projects in my file system and configured the Xcode to have a link to that. For iPhone it is working perfectly. IN the case of Android i need to have this folder under assets. If the www folder is copied inside assets it is working fine. But if i try to give a link inside assets to www my project is working. It throws error "File not found /www/index.html". Can someone help me to solve this situation. So that i maintain www in one place and both my iPhone and Android refers to the same folder.

感谢。

推荐答案

我发现这个工作最好的方法是使用一个符号链接到文件夹中的项目。这可以让你保持一组文件,并且可以将它们链接到无论你想在你的项目中,同时仍然是相同的源工作。

The best way I've found to work with this is to use a symbolic link to the folder in your projects. This lets you keep one set of files, and you can link them to wherever you want in your project while still working on the same source.

对于Unix类系统使用:

For Unix type systems use:

ln -s source link_name

既然你用iPhone项目的工作,以及我假设你使用的是Mac,但这里的的Windows Vista / 7的版本:

Since you're working with an iPhone project as well I'm assuming you're on a Mac, but here's the Windows Vista/7 version:

mklink /D link_name source

这篇关于如何创建链接到内部资产WWW在android文件夹,?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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