Skip to content

Commit ab7c6de

Browse files
author
minggo
authored
Merge pull request #383 from minggo/merge-v3.13.1
Merge v3.13.1
2 parents 81beb4a + 938e779 commit ab7c6de

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

bin/strings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"COMPILE_ERROR_TARGET_NOT_FOUND_FMT" : "Can't find 'target' in file '%s'",
213213
"COMPILE_ERROR_AP_TOO_LOW_FMT" : "The Android-platform of project '%s' should be equal/larger than %d, but %d is specified.",
214214
"COMPILE_ERROR_AP_NOT_FOUND_FMT" : "Can't find right Android-platform for project : '%s'. The Android-platform should be equal/larger than %d.",
215-
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "The directory '%s' can't be found in Android SDK",
215+
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "The directory '%s' can't be found in ANDROID_SDK_ROOT/platforms, please use --ap to set needed API level",
216216
"COMPILE_ERROR_NOT_SPECIFY_OUTPUT" : "Not specified the output directory!",
217217
"COMPILE_ERROR_PARSE_CFG_FAILED_FMT" : "Configuration file '%s' is not existed or broken!",
218218
"GEN_LIBS_BRIEF" : "Generate prebuilt libs of engine. The libs will be placed in 'prebuilt' folder of the engine root path.",
@@ -541,7 +541,7 @@
541541
"COMPILE_ERROR_TARGET_NOT_FOUND_FMT" : "在 '%s' 文件中未找到 'target'。",
542542
"COMPILE_ERROR_AP_TOO_LOW_FMT" : "'%s' 工程的 Android 目标平台版本应该大于等于 %d,但是指定的值为 %d。",
543543
"COMPILE_ERROR_AP_NOT_FOUND_FMT" : "未找到工程 '%s' 可用的 Android 目标平台。 Android 目标平台版本应该大于或等于 %d。",
544-
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "在 Android SDK 中未找到文件夹 '%s'。",
544+
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "在 Android SDK的platforms下未找到文件夹 '%s',请使用 --ap 指定需要的API版本",
545545
"COMPILE_ERROR_NOT_SPECIFY_OUTPUT" : "未指定输出路径。",
546546
"COMPILE_ERROR_PARSE_CFG_FAILED_FMT" : "配置文件 '%s' 不存在或者已损坏。",
547547
"GEN_LIBS_BRIEF" : "生成引擎的预编译库。生成的库文件会保存在引擎根目录的 'prebuilt' 文件夹。",
@@ -869,7 +869,7 @@
869869
"COMPILE_ERROR_TARGET_NOT_FOUND_FMT" : "在 '%s' 檔案中未找到 'target'。",
870870
"COMPILE_ERROR_AP_TOO_LOW_FMT" : "'%s' 工程的 Android 目標平臺版本應該大於等於 %d,但是指定的值為 %d。",
871871
"COMPILE_ERROR_AP_NOT_FOUND_FMT" : "未找到工程 '%s' 可用的 Android 目標平臺。 Android 目標平臺版本應該大於或等於 %d。",
872-
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "在 Android SDK 中未找到檔案夾 '%s'。",
872+
"COMPILE_ERROR_NO_AP_IN_SDK_FMT" : "在 Android SDK的platforms下未找到檔夾 '%s',請使用 --ap 指定需要的API版本",
873873
"COMPILE_ERROR_NOT_SPECIFY_OUTPUT" : "未指定輸出路徑。",
874874
"COMPILE_ERROR_PARSE_CFG_FAILED_FMT" : "配置檔案 '%s' 不存在或者已損壞。",
875875
"GEN_LIBS_BRIEF" : "生成引擎的預編譯庫。生成的庫檔會保存在引擎根目錄的 'prebuilt' 檔夾。",

plugins/plugin_compile/build_android.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,10 @@ def get_target_config(self, proj_path):
317317
# check the selected android platform
318318
def check_android_platform(self, sdk_root, android_platform, proj_path):
319319
ret = android_platform
320-
min_platform = self.get_target_config(proj_path)
321320
if android_platform is None:
321+
min_platform = self.get_target_config(proj_path)
322322
# not specified platform, use the one in project.properties
323323
ret = 'android-%d' % min_platform
324-
else:
325-
# check whether it's larger than min_platform
326-
select_api_level = self.get_api_level(android_platform)
327-
if select_api_level < min_platform:
328-
# raise error
329-
raise cocos.CCPluginError(MultiLanguage.get_string('COMPILE_ERROR_AP_TOO_LOW_FMT',
330-
(proj_path, min_platform, select_api_level)),
331-
cocos.CCPluginError.ERROR_WRONG_ARGS)
332324

333325
ret_path = os.path.join(cocos.CMDRunner.convert_path_to_python(sdk_root), "platforms", ret)
334326
if not os.path.isdir(ret_path):

0 commit comments

Comments
 (0)