Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
fix: APK Generator is unable to find build tools version. (#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthivMangukiya authored and iamareebjamal committed Mar 27, 2018
1 parent 6c7560f commit 36e1ae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apk-generator/v2/app/generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def generate(self, should_notify=True):

self.update_status('Preparing android build tools')

build_tools_version = get_build_tools_version(self.get_path('app/build.gradle'))
build_tools_version = get_build_tools_version(self.get_path('build.gradle'))

logger.info('Detected build tools version: %s' % build_tools_version)

Expand Down
4 changes: 2 additions & 2 deletions apk-generator/v2/app/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def get_build_tools_version(build_gradle_path):
version = None
with open(build_gradle_path) as f:
for line in f:
if "buildToolsVersion" in line:
version = line.replace('buildToolsVersion', '').replace('"', '').replace('\'', '').strip()
if "project.ext.buildTools" in line:
version = line.replace('project.ext.buildTools', '').replace('=','').replace('"', '').replace('\'', '').strip()
return version


Expand Down

0 comments on commit 36e1ae0

Please sign in to comment.