set UTF-8 for android update command explicitly
Fix for fail in to update android package. It is happened to meet under the following conditions both. * User environment is not used UTF-8 in default file.encoding in java * Android-sdk license text is included not-ASCII code characters. If user define JAVA_TOOL_OPTIONS in env, inherit it.
This commit is contained in:
parent
312fb67be4
commit
dbd6be6e4b
1 changed files with 3 additions and 1 deletions
|
@ -301,10 +301,12 @@ class TargetAndroid(Target):
|
|||
|
||||
def _android_update_sdk(self, packages):
|
||||
from buildozer.libs.pexpect import EOF
|
||||
java_tool_options = environ.get('JAVA_TOOL_OPTIONS', '')
|
||||
child = self.buildozer.cmd_expect('{} update sdk -u -a -t {}'.format(
|
||||
self.android_cmd, packages,
|
||||
cwd=self.buildozer.global_platform_dir),
|
||||
timeout=None)
|
||||
timeout=None,
|
||||
env={'JAVA_TOOL_OPTIONS': java_tool_options + ' -Dfile.encoding=UTF-8'})
|
||||
while True:
|
||||
index = child.expect([EOF, '[y/n]: '])
|
||||
if index == 0:
|
||||
|
|
Loading…
Reference in a new issue