'sdk_path': "$ANDROID_HOME",
'ndk_paths': {
'r9b': None,
- 'r10e': None,
- 'r12b': "$ANDROID_NDK",
+ 'r10e': "$ANDROID_NDK",
},
'build_tools': "24.0.0",
'force_build_tools': False,
pathlist += glob.glob('/System/Library/Java/JavaVirtualMachines/1.[6-9].0.jdk')
pathlist += glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[6-9]*')
if os.getenv('JAVA_HOME') is not None:
- pathlist += os.getenv('JAVA_HOME')
+ pathlist.append(os.getenv('JAVA_HOME'))
if os.getenv('PROGRAMFILES') is not None:
pathlist += glob.glob(os.path.join(os.getenv('PROGRAMFILES'), 'Java', 'jdk1.[6-9].*'))
for d in sorted(pathlist):
props += "sdk.dir=%s\n" % config['sdk_path']
props += "sdk-location=%s\n" % config['sdk_path']
ndk_path = build.ndk_path()
- if ndk_path:
+ # if for any reason the path isn't valid or the directory
+ # doesn't exist, some versions of Gradle will error with a
+ # cryptic message (even if the NDK is not even necessary).
+ # https://gitlab.com/fdroid/fdroidserver/issues/171
+ if ndk_path and os.path.exists(ndk_path):
# Add ndk location
props += "ndk.dir=%s\n" % ndk_path
props += "ndk-location=%s\n" % ndk_path