Skip to content

Commit 1b2871e

Browse files
author
zhangbin
committed
Solve the decode error during ndk-building sometimes.
Error message: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 37: ordinal not in range(128)
1 parent 0aae962 commit 1b2871e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/project_compile/build_android.py

+2
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def do_ndk_build(self, ndk_build_param, build_mode):
186186

187187
app_android_root = self.app_android_root
188188
cocos_root = self.cocos_root
189+
reload(sys)
190+
sys.setdefaultencoding('utf8')
189191
ndk_path = os.path.join(ndk_root, "ndk-build")
190192
module_paths = [os.path.join(app_android_root, path) for path in self.ndk_module_paths]
191193

0 commit comments

Comments
 (0)