How to use the same source from PhoneGap Build project and PhoneGap Android in Eclipse

Anyone may notice that there is a difference in the development of Eclipse in PhoneGap Build and PhoneGap. I want to develop based on PhoneGap Build to support Android and iPhone. However, for debugging in Android, I need to set up an Eclipse project that is different from PhoneGap Build.

For example, the location of index.html is in the Build root directory when it is in the / www file in Eclipse. There is config.xml in the assembly, while I need to configure it in AndroidManifest.xml for Eclipse.

How can I use the same source to develop PhoneGap Build while I can debug it in Android and my friend can debug iPhone? Any useful folder structure? I want to put in the same SVN / GIT repo, and I do not want to duplicate index.html, css, img, js files.

+6
source share
2 answers

In Xcode, you can easily change the location of the / www folder:

  • In the left pane, go to "Goals" → "Your application"
  • Double-click on each shell script and change / www to the new location of your www folder.

So you can have a folder structure like this:

/myapp/android (android project files) /myapp/ios (ios project files) /myapp/www (source) 
+2
source

This is not really integration with PhoneGap Build, but you should look at Cordoba: https://github.com/brianleroux/Cordova

This is a new tool for creating a single code base for the simultaneous operation of several platforms. It currently supports iOS and Android, and I assume that further support will be available in the future.

0
source

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


All Articles