diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 9914000..22a90da 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -854,7 +854,7 @@ class TargetAndroid(Target): fd.writelines((line.encode('utf-8') for line in content)) except: fd.writelines(content) - if not content[-1].endswith(u'\n'): + if content and not content[-1].endswith(u'\n'): fd.write(u'\n') for index, ref in enumerate(references): fd.write(u'android.library.reference.{}={}\n'.format(index + 1, ref))