Flobbo Flobbo - 1 month ago 7
Android Question

Create phonegap project that is NOT named HelloWorld

I have been trying for at least 2 hours to create a new phonegap project via command line that is NOT named HelloWorld. After finding a myriad of different options/methods I am quite puzzled as to why all phonegap related instructions are either confusing, wrong, or simply do not work.

I followed these instructions here: http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html (in all variations) but was unsuccessful.

What is the correct way to create a new project with a name of my choosing and set it up to run on Android?

This might seem like an extremely dumb question but I can not even begin to describe the amount of frustration I had so far with trying to use phonegap and any related software. Nothing works as expected and none of the instructions I found anywhere translate to something usable in the real world.

Answer

Sure you can

edit your project name in config.xml located in parent folder, not in platform.

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.company.YourProjectName" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>YourProjectName</name>
    <description>
        YourProjectName.
    </description>
    <author email="xxxxxxxx@yahoo.com" href="http://revivalx.com">
        Mohammad Nurdin bin Norazan
    </author>
    <content src="index.html" />
    <access origin="*" />
</widget>

enter image description here

then you run cordova build android.

Done!!