Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
fix(android): apksigner.jar not found during packaging operation
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Nov 29, 2021
1 parent eee4983 commit e653197
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion generate/generate/android_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,11 @@ def _launch_avd(build, sdk):
raise AndroidError(NEW_AVD_TEMPLATE)

def _sign_zipf(lib_path, java, keystore, storepass, keyalias, keypass, signed_zipf_name, zipf_name):
apksigner_jar = path.join(lib_path, "apksigner.jar")
if not os.path.exists(apksigner_jar):
apksigner_jar = path.join(lib_path, "noarch.android.build-tools.29.0.3", "apksigner.jar")
command = [
java, "-jar", path.join(lib_path, "apksigner.jar"), "sign",
java, "-jar", apksigner_jar, "sign",
"--ks", keystore,
"--ks-pass", "pass:%s" % storepass,
"--ks-key-alias", keyalias,
Expand Down Expand Up @@ -451,6 +454,12 @@ def _create_apk(build, java, sdk, target, output_filename, interactive=True):
"""

lib_path = path.normpath(path.join('.template', 'lib'))
LOG.error("LIB PATH: %s: " % lib_path)
if not path.isdir(lib_path):
lib_path = lib.expand_relative_path(
build, path.join('generate', 'lib')
)
LOG.error("LIB PATH is now: %s: " % lib_path)
dev_dir = path.normpath(path.join('development', target))

LOG.info('Creating Android .apk file')
Expand Down

0 comments on commit e653197

Please sign in to comment.