diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt
index bef3abf9b1..d6e524f8ec 100644
--- a/templates/cpp-template-default/CMakeLists.txt
+++ b/templates/cpp-template-default/CMakeLists.txt
@@ -71,8 +71,7 @@ list(APPEND GAME_HEADER
)
if(ANDROID)
- # change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
- set(APP_NAME MyGame)
+ # the APP_NAME should match on AndroidManifest.xml
list(APPEND GAME_SOURCE
proj.android/app/jni/hellocpp/main.cpp
)
diff --git a/templates/cpp-template-default/cocos-project-template.json b/templates/cpp-template-default/cocos-project-template.json
index 26aa6af06d..9f4382b9de 100644
--- a/templates/cpp-template-default/cocos-project-template.json
+++ b/templates/cpp-template-default/cocos-project-template.json
@@ -24,6 +24,12 @@
"proj.android/app/AndroidManifest.xml"
]
},
+ "project_replace_so_name": {
+ "src_so_name": "HelloCpp",
+ "files": [
+ "proj.android/app/AndroidManifest.xml"
+ ]
+ },
"project_replace_mac_bundleid": {
"src_bundle_id": "org.cocos2dx.hellocpp",
"files": [
diff --git a/templates/cpp-template-default/proj.android/app/AndroidManifest.xml b/templates/cpp-template-default/proj.android/app/AndroidManifest.xml
index 88d0669f15..3e9a77e159 100644
--- a/templates/cpp-template-default/proj.android/app/AndroidManifest.xml
+++ b/templates/cpp-template-default/proj.android/app/AndroidManifest.xml
@@ -14,7 +14,7 @@
+ android:value="HelloCpp" />
+ android:value="HelloLua" />