Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3: # Aidl cannot be executed AttributeError: 'module' object has no attribute 'maxint' #392

Closed
hartred opened this issue Aug 17, 2016 · 4 comments

Comments

@hartred
Copy link

hartred commented Aug 17, 2016

buildozer fails when running "buildozer android debug".
Used virtualenv with python 3.4 interpreter.

# Aidl cannot be executed
Traceback (most recent call last):
  File "/home/kivy/projects/kivy_tutor/bin/buildozer", line 11, in <module>
    sys.exit(main())
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/__init__.py", line 1020, in run_command
    self.target.run_commands(args)
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/target.py", line 90, in run_commands
    func(args)
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/target.py", line 100, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/__init__.py", line 174, in prepare_for_build
    self.target.install_platform()
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/targets/android.py", line 500, in install_platform
    self._install_android_packages()
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/targets/android.py", line 422, in _install_android_packages
    self._check_aidl(v_build_tools)
  File "/home/kivy/projects/kivy_tutor/lib/python3.4/site-packages/buildozer/targets/android.py", line 450, in _check_aidl
    if sys.maxint > 2**32:
AttributeError: 'module' object has no attribute 'maxint'
@FermiParadox
Copy link
Contributor

FermiParadox commented Sep 7, 2016

The bug is on this line. According to Stack Overflow sys.maxint was removed in Python3 and there are some solutions. However according to @inclement:

it could check platform.architecture() instead. I might just remove that if/else entirely. Leave only the else.

@FermiParadox
Copy link
Contributor

FermiParadox commented Sep 7, 2016

You don't have to fix the bug. Just install the missing dependencies for buildozer, and it will probably not appear.

Make sure you install sdk 8 instead of 7, if using Ubuntu 16.04

@mxchinegod
Copy link

mxchinegod commented Apr 18, 2017

Why not just use maxsize()?

@inclement
Copy link
Member

Closing as fixed in the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants