Android setup not working with other installed AndroidSDK
When trying to setup the android-crosscompiler using fips, I ran into the following issue while fips was trying to unpack the SDK zipfile:
C:\Users\Andre\Source\Repos\fips-bgfx>fips setup android
=== setup Android SDK/NDK :
'C:/Users/Andre/Source/Repos/fips-sdks/win/android-sdk_r22.6.2-windows.zip' already exists
unpacking 'C:/Users/Andre/Source/Repos/fips-sdks/win/android-sdk_r22.6.2-windows.zip'...
Traceback (most recent call last):
File "fips", line 17, in <module>
fips.run(fips_path, proj_path, sys.argv)
File "C:\Users\Andre\Source\Repos/fips/mod/fips.py", line 49, in run
verb.verbs[verb_name].run(fips_path, proj_path, verb_args)
File "C:/Users/Andre/Source/Repos/fips/verbs/setup.py", line 21, in run
android.setup(fips_dir, proj_dir)
File "C:\Users\Andre\Source\Repos/fips/mod/android.py", line 121, in setup
uncompress(fips_dir, sdk_archive_path)
File "C:\Users\Andre\Source\Repos/fips/mod/android.py", line 82, in uncompress
archive.extractall(get_sdk_dir(fips_dir))
File "D:\Code\Android\AndroidSDK\ndk-bundle\prebuilt\windows-x86_64\lib\python2.7/zipfile.py", line 1036, in extractall
self.extract(zipinfo, path, pwd)
File "D:\Code\Android\AndroidSDK\ndk-bundle\prebuilt\windows-x86_64\lib\python2.7/zipfile.py", line 1024, in extract
return self._extract_member(member, path, pwd)
File "D:\Code\Android\AndroidSDK\ndk-bundle\prebuilt\windows-x86_64\lib\python2.7/zipfile.py", line 1078, in _extract_member
with self.open(member, pwd=pwd) as source, \
File "D:\Code\Android\AndroidSDK\ndk-bundle\prebuilt\windows-x86_64\lib\python2.7/zipfile.py", line 1006, in open
close_fileobj=should_close)
File "D:\Code\Android\AndroidSDK\ndk-bundle\prebuilt\windows-x86_64\lib\python2.7/zipfile.py", line 526, in __init__
self._decompressor = zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'
Note that I already have an instance of the androidSDK installed at "D:\Code\Android\AndroidSDK", which fips gets from my environment variables. After renaming that folder, fips unpacked the zipfile successfully.
Thanks for the bug report! I wont be able to look into the problem over the weekend since I'll only have a slow internet connection, but try to look into it start of next week.
It looks like fips is picking up the zlib module from a python version inside a separate python installation in the old Android SDK installation :/
If you do a 'where python', what path does it print? Something inside d:\Code\Android\AndroidSDK?
Do you also have a 'proper' python installation on your system? I wish the Android SDK wouldn't mess up the search path and environment variables :/
"where python" does indeed point me to the python installation of the android SDK.
I also noticed androids python-executable was indeed "accidentally" put into the PATH by me, since I added that folder to use some other tools inside, so I guess it was kind of my fault anyways.
I've simply put the 'proper' python installation to be preferred over the one in the NDK now, which should do the trick.
Ok, good to know :) Let me know if you stumble over other problems, building for Android under Windows is less tested then OSX and Linux.