[Phonegap + Sencha Touch] Question about the name of the program packaged by phonegap in mobile development 18 Sencha Touch

Source: Internet
Author: User

Previously said

Sencha phonegap init com. pushsoft. myapp MyApp

The package installation package is named "“myapp.apk". The program name displayed on the mobile phone desktop (text under the icon) is also "MyApp"

If you want to change to another name, modify the MyApp \ config. xml file and set" MyApp "Change the name of MyApp in the middle to the desired name. Note: If the xml content contains Chinese characters, it should be changed to UTF-8 encoding. Note that it is the encoding of text files, not the top" ". We recommend that you use Notepad ++ to change the encoding of text files.

The problem is that if you change the full Chinese name, for example, "my program", the sencha app build native will fail (phonegap local build android also fails), for example:


Figure 1: Project name garbled <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + PGJyPgo8L3A + CjxwPjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20140512/2014051209110368.png" alt = "\">

Figure 2: Compilation failed



Figure 3: the java file in the generated Android project has no file name



Figure 4: As shown in figure 2, the compilation fails because the java file contains no class name.


The reason is that the java File class name is from the config. xml file" My programs "The intermediate name, cordova or phonegap, does not support Chinese Well, resulting in this situation.


The solution is as follows:

Open C: \ Users \ USERNAME \. cordova \ lib \ android \ cordova \ 3.4.0 \ bin \ lib \ create. js and find the content in the red box below



Change it to the following:


The purpose of this correction is: if the name in config. xml is English, use this English name. If it is changed to Chinese, use the name "CordovaExample.


The package is named "Export cordovaexample.apk". The program name displayed on the mobile phone desktop (text under the icon) is "My program"


If you think that the name of apkis "cordovaexample.apk" is not good, but you want to change the file name, for example, you want to change the package name (such as "com. pushsoft. the last part of myapp is used as the file name (for example, "Myapp"), which can be changed as follows:



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.