1

I am trying to upgrade my Android Phonegap app to 3.0 and am following the official guides. I am working on Windows.

I have ran the command to create the base folder. I copied all my www content over as well as updated the config.xml and placed all of my icons and splash screen images in the proper folders.

I then ran the android build command through the CLI and the platform file tree for android was populated. However, all of the files in the android tree are the demo "hello world" files. I thought the build command was suppose to build off of the root www folder? From what I have read the platform tree files are overwritten when you run the build command again once you update your root files? Am I suppose to erase all of the android helloworld files?

I don't have any platform dependent .js files, it would just be the plugins. Also, the test helloworld app links the phonegap.js file to the root js/phonegap.js but there is no such file, the file is found in the platform www folder. So the link is incorrect.

Also, I am not able to get this type of file tree to work with Eclipse. Is it even possible to use Eclipse with the new 3.0 file structure? Trying to build anything using Ant is a nightmare.

Could someone provide some guidance for this type of upgrade? The documentation is very short.

Thanks.

EDIT:

Maybe some more specific questions.

-From what I understand when I edit my app I edit the root www folder, not the android sub www folder correct?

-If this is correct then do I have to run "Phonegap build" every time I edit the www root folder so then it will hopefully update my android www folder?

I erased all of the helloworld data from the android www folder and replaced the data with my root www data. I then modified the root www data and ran the build command for android.

After running the build command for the android platform from the root www folder there was no change to the android www folder.

-Why have a root folder with the www data if I have to manually update the www folder for the android build? So every time I make a change to the root folder I now have to change the android www folder as well.

-Why even have a root www folder if I have to manually change everything in the android www folder?

-Everything from the www root folder has to be in the android www folder or I can't run Eclipse to test the app.

-It seems like I am maintaining two copies of the exact same work for no reason.

I am obviously doing something wrong with how I am maintaining my code base?

nomaam
  • 1,213
  • 2
  • 22
  • 37
  • Please follow this link for the solution. http://stackoverflow.com/questions/18789524/phonegap-3-0-wants-android-17-but-i-want-android-18?rq=1 – Shoaib Chikate Oct 09 '13 at 10:45

1 Answers1

0

I Am kind of struggling the same way, see Upgrade to phonegap 3.3.0

I did not find all the asnwers yet, but some of them are in my question and answers.

Your first question: theoretically you should only edit the root www folder (which I called the blue-print www folder), and with phonegap or cordova build, it should make all the needed things in the android platform.... but it seems not all is working well yet... so that's why you still have to do some things also in the android folder.... (in deed, double work and not yet so handy).

Please note that the config xml in the root (or blueprint) folder is not the same as the one that should be in the platform\android folder... it has a different schema and defines all the things needed for both config and android manifest files etcetera.

best thing to do is to create a new empty phonegap project, and look for those files as an example (keep this newly created files as a copy... just to check once in a while how it should work). Because documentation does not describe this blueprint config.xml file... only the one that's created with the build command!

Community
  • 1
  • 1
michel.iamit
  • 5,788
  • 9
  • 55
  • 74