Phonegap iOS / Android - Linking the www folder

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

The structure of my folder looks something like this:

Code / Android / Eclipse Project Files

Code / iOS / xCode Project Files

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

Now I'm trying to link to an external www folder in eclipse, I have three methods, including the one suggested here: How to link the resource directory / www in an Eclipse / Phonegap / Android project? without any success:

When launching the application on an Android virtual device, an error is reported if the www folder containing index.html is actually not in Android / Project / Assets / ..

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

thanks

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

+6
source share
2 answers

I resolved the same issue on Windows with the following command:

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

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

This worked for me on Windows. On a Mac, you can use the xcode folder link or the ln command to do this.

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

+9
source

Another possible solution for this is to use external SVN files in each directory for iOS and Android to pull out a shared WWW directory.

0
source

Source: https://habr.com/ru/post/906218/


All Articles