Cocos2d-x 3.0 modify the installer name, change the default icon, modify the screen direction, modify the version number, some notes, cocos2d-x3.0

Source: Internet
Author: User

Cocos2d-x 3.0 modify the installer name, change the default icon, modify the screen direction, modify the version number, some notes, cocos2d-x3.0

Many novice programmers compile the game into an apk and install it on their mobile phones. The installation program name and game icon are both Cocos2dx default, and the screen direction is horizontal by default, so how do I change it to what I want?

Open the project you created-find proj. android, find AndroidManifest. xml, and edit:

<? Xml version = "1.0" encoding = "UTF-8"?>
<Manifest xmlns: android = "http://schemas.android.com/apk/res/android"
Package = "com. Irvingrain. hellocpp"
Android: versionCode = "1"

// The version number of the current program is displayed here.
Android: versionName = "1"

// The version name of the current program, such as 1.1 and 1.2, has been prompted. You can modify this value if you need to modify the game version.

Android: installLocation = "auto">


<Uses-sdk android: minSdkVersion = "9"/>
<Uses-feature android: glEsVersion = "0x00020000" type = "regxph" text = "yourobjectname"/>


<Application android: label = "@ string/app_name" // The following message is displayed: @ string/app_name indicates that the app_name tag is defined in string. xml.
Android: icon = "@ drawable/icon">
 
<! -- Tell Cocos2dxActivity the name of our. so -->
<Meta-data android: name = "android. app. lib_name"
Android: value = "cocos2dcpp"/>


<Activity android: name = "org. cocos2dx. cpp. AppActivity"
Android: label = "@ string/app_name"
Android: screenOrientation = "landscape"
Android: theme = "@ android: style/Theme. NoTitleBar. Fullscreen"
Android: configChanges = "orientation">


<Intent-filter>
<Action android: name = "android. intent. action. MAIN"/>
<Category android: name = "android. intent. category. LAUNCHER"/>
</Intent-filter>
</Activity>
</Application>


<Supports-screens android: anyDensity = "true"
Android: smallScreens = "true"
Android: normalScreens = "true"
Android: largeScreens = "true"
Android: xlargeScreens = "true"/>


<Uses-permission android: name = "android. permission. INTERNET"/>
<! -- Uses-permission android: name = "android. permission. WAKE_LOCK" Disable sleep on the mobile phone/-->
</Manifest>

1. modify the program name: Open proj. android \ res \ values, string. xml

<? Xml version = "1.0" encoding = "UTF-8"?>
<Resources>
<String name = "app_name"> program name </string>
</Resources>

// If the Chinese name garbled characters appear after the game is installed, it is estimated that there is a problem with your string. xml encoding, it is recommended to use EditPlus to change the file encoding to UTF-8 after overwriting.

2. Modify the game icon:

Open proj. android/res. The folder contains three folders: drawable-hdpi, drawable-mdpi, and drawable-ldpi,

Make the icon you want to modify to the original pixel and overwrite it. If the icon is still not changed after it is installed on your mobile phone, it is estimated that it is the previous cache,

We recommend that you uninstall the game and then clear the system garbage and cache files and reinstall them.

3. Modify the screen direction: Modify AndroidManifest. xml above and find android: screenOrientation:

The default is landscape screen landscape, and the portrait screen is portrait.

4. Modify the game version: Modify AndroidManifest. xml and find android: versionName = "1 ",

Modify this value, such as (1.1, 1.2)

If android: versionName = "2", android: versionCode = "2" is recommended"

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.