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

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

问题描述

我正在开发一个应该可以在 iOS 和 Android 上运行的 PhoneGap 应用.我的文件夹结构如下所示:

<前>++-[应用程序文件夹]|+-[android](包含Eclipse工作区和项目文件)|+-[iOS](包含XCode项目文件)|+-[www](包含实际应用的所有 html、js、css 等文件)

在 XCode 项目中引用 www 文件夹很容易,那里的一切工作正常.

但是,在 Eclipse 中创建 www 文件夹的链接没有按预期工作:我使用导入 -> 文件系统"在现有资产文件夹下创建链接,一切似乎都正常.但是在构建步骤中文件不会被复制到 apk.
知道我做错了什么吗?

解决方案

windows 用这个命令 mklink/D link-name target-folder linux/mac 用 ln代码> 创建源链接.两者都适合我.

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)

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

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?

解决方案

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.

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

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