如何链接资产/ WWW文件夹在Eclipse / PhoneGap的/ Android项目? [英] How to link assets/www folder in Eclipse / Phonegap / Android project?

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

问题描述

我工作的一个PhoneGap的应用程序,应该是在iOS和Android上运行。我的文件夹结构如下所示:

I am working on a PhoneGap app that is supposed to run on iOS and Android. My folder structure looks like this:


+-+-[app folder]
  |
  +-[android] (contains Eclipse workspace and project files)
  |
  +-[iOS] (contains XCode project files)
  |
  +-[www] (contains all html, js, css etc. files for the actual app)

这很容易引用www文件夹在X code项目,那里的一切工作正常。

It's easy to reference the www folder in the XCode project, everything there works fine.

然而,在Eclipse中创建一个链接的WWW文件夹不能按预期:我使用导入 - >文件系统下创建的现有资产文件夹中的链接,一切似乎都正常工作。但文件没有得到复制到在构建步骤的apk。
知不知道我做错了吗?

However, creating a link to the www folder in Eclipse doesn't work as expected: I used 'Import -> Filesystem' to create the link under the existing assets folder and everything seemed to work fine. But the files are not getting copied to the apk during the build step.
Any idea what I am doing wrong?

推荐答案

对于Windows使用此命令 MKLINK / D链接名称的目标文件夹并为Linux / Mac中使用 LN 来创建源链接。这两个对我的作品。

For windows use this command mklink /D link-name target-folder and for linux/mac use ln to create a source link. Both works for me.

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

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