Profile Image
3
Josephin DoeTyping . .
Profile Image
1
Lary Doeonline
Profile Image
Aliceonline
Profile Image
1
Alia10 min ago
Profile Image
Suzen15 min ago
Profile Image
3
Josephin DoeTyping . .
Profile Image
1
Lary Doeonline
Profile Image
Aliceonline
Profile Image
1
Alia10 min ago
Profile Image
Suzen15 min ago
Profile Image
3
Josephin DoeTyping . .
Profile Image
1
Lary Doeonline
Profile Image
Aliceonline

New Group

New Contact

Profile Image

Josephin Doei am not what happened . .

Profile Image
Lary DoeAvalable
Profile Image
Alicehear using Dasho
A
AliaAvalable
Profile Image
SuzenAvalable
JD
Josephin DoeDon't send me image
Profile Image
Lary Doenot send free msg
Desktop settings

You get latest content at a time when data will updated

Application settings

Automaticaly take backup as par schedule

System settings

Allow to show public user message

Josephin Doe
Profile Image

hello tell me something

about yourself?

8:20 a.m.

Ohh! very nice

8:22 a.m.

Profile Image
Profile Image

can you help me?

8:20 a.m.

看不到错误?命令行窗口不会在报错时关闭

文章详情

你可以修改函数来捕获错误,并使用 `rty` 处理错误,同时确保命令行窗口不会在报错时关闭。下面是修改后的代码:

import subprocess
import sys

def createApk_release():
	try:
		printGreen("正在打包apk...!\n".decode('utf8'))
		cmd = "cocos.bat compile -p android --ap android-20 -s " + sys.path[0] + " --compile-script 1 --lua-encrypt  --lua-encrypt-key " + xxtea_key + " --lua-encrypt-sign " + xxtea_sign + " -m release"
		pro = subprocess.Popen(cmd, shell=True)
		pro.wait()

		if pro.returncode != 0:
			raise Exception("APK 打包失败,错误代码:{}".format(pro.returncode))
	except Exception as e:
		print(e)
		rty(e)

– 添加了 `try-except` 块来捕获并抛出异常。
– 使用 `rty` 进行错误抛出,命令行窗口在报错时不会关闭。

Tags:

发表评论