Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap iOS/Android - Linking www folder

I am trying to use a single /www folder to write a phonegap app for both iOS and Android,

My folder structure is something like this :

Code/Android/Eclipse project files

Code/iOS/xCode project files

Code/www/index.html, phonegap.js,etc.

Now i am trying within eclipse to link to the external www folder, i have trier several methods including the one proposed here : How to link assets/www folder in Eclipse / Phonegap / Android project? without any success :

When starting the app in an android virtual device reports an error if the www folder containing the index.html is not actually in Android/Project/Assets/..

Any idea how to make this work with links? Or is there maybe a way to tell eclipse to copy files to a new location upon building the project?

Thank you

PS : I will be mainly on windows so symbolic links are not an option.

like image 692
user1135233 Avatar asked Jan 17 '12 16:01

user1135233


1 Answers

I have resolved the same issue on windows with following command:

cd c:\code\app\android\assets\

mklink /D www c:\code\app\www

This worked for me in Windows. On Mac you can either use xcode folder referencing or ln command for the same.

(edit 3/14/2013) Windows 7: Make sure to run the command prompt as administrator

like image 52
dhaval Avatar answered Oct 19 '22 07:10

dhaval