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: