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

Buildozer not finding aidl #413

Closed
martini97 opened this issue Oct 28, 2016 · 17 comments
Closed

Buildozer not finding aidl #413

martini97 opened this issue Oct 28, 2016 · 17 comments

Comments

@martini97
Copy link

I'm trying to package an app to apk but when I run the buildozer (buildozer android debug) it fails as it's not finding the Aidl, I installed the aidl package (apt install aidl) but it still doesn't find it, I tried updating everything, used the right version for Cpython, and still nothing, any thoughts?

@ranjian0
Copy link

ranjian0 commented Nov 6, 2016

Check that aidl can be executed

Search for Aidl

Run '/home/ranjian0/sdk/android-sdk-linux/build-tools/25.0.0/aidl'

Cwd None

Aidl cannot be executed

Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 9, in
load_entry_point('buildozer==0.32', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python3.4/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python3.4/dist-packages/buildozer/init.py", line 1020, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python3.4/dist-packages/buildozer/target.py", line 90, in run_commands
func(args)
File "/usr/local/lib/python3.4/dist-packages/buildozer/target.py", line 100, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python3.4/dist-packages/buildozer/init.py", line 174, in prepare_for_build
self.target.install_platform()
File "/usr/local/lib/python3.4/dist-packages/buildozer/targets/android.py", line 500, in install_platform
self._install_android_packages()
File "/usr/local/lib/python3.4/dist-packages/buildozer/targets/android.py", line 422, in _install_android_packages
self._check_aidl(v_build_tools)
File "/usr/local/lib/python3.4/dist-packages/buildozer/targets/android.py", line 450, in _check_aidl
if sys.maxint > 2**32:
AttributeError: 'module' object has no attribute 'maxint'

Is this a bug or something? I have spent that whole day trying to find a solution for this. None so far.
Updating android sdk, changing permissions, upgrading python packages etc. The few threads on google for this error have no specific solution.

Someone help!!!!

@alej0varas
Copy link

Work around! ;)

Assuming you are using Ubuntu(15.10)

sudo apt install google-android-build-tools-installer
cd ~/.buildozer/android/platform/android-sdk-20
mkdir -p build-tools/0
ln -s /usr/bin/aidl ~/.buildozer/android/platform/android-sdk-20/build-tools/0/aidl

@alej0varas
Copy link

My previous comment doesn't solve the problem at the end. But running buildozer android debug deploy run 3 times works :P

@tito
Copy link
Member

tito commented May 15, 2017

The issue about maxint has been fixed.

@farzinh
Copy link

farzinh commented Jun 3, 2018

But I still have the same problem

@Platun0v
Copy link

Platun0v commented Jun 6, 2018

I have this problem also

@ImtiyazKhan117
Copy link

@farzinh
@Platun0v
try this its work for me
i copy past my project into another folder and refactor it
than
run:
buildozer android clean
and
run:
buildozer android debug deppoy

@Flajt
Copy link

Flajt commented Feb 28, 2019

@alej0varas is there something to change for 16.04?

@psionman
Copy link

psionman commented Apr 29, 2019

I still have this problem on 16.04

Check that aidl can be executed
build-tools folder not found /home/user/.buildozer/android/platform/android-sdk/build-tools
Search for Aidl
Aidl not found, please install it.

So i created build-tools/0/ and copied in aidl

the message now says:

Check that aidl can be executed
Search for Aidl
Aidl not found, please install it.

@IgorCode
Copy link

I didn't have "build-tools" folder, running ./home/MY_USERNAME/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;28.0.0" installed build tools and fixed missing aidl issue.

@cristinarivera
Copy link

I didn't have "build-tools" folder, running ./home/MY_USERNAME/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;28.0.0" installed build tools and fixed missing aidl issue.

Perfecto!

@bogbasic
Copy link

In the buildozer.spec file you can set "android.skip_update = False". Then it finds aidl and you can move on to the next error ;-0

@tabete1st
Copy link

tabete1st commented Apr 18, 2020

Make sure these are installed first by typing these commands in terminal:
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libstdc++6

then lastly
sudo apt-get install aidl
buildozer android update -v2

@IgorCode
Copy link

@tabete1st What does v2 switch do?

@tabete1st
Copy link

tabete1st commented Apr 19, 2020

@tabete1st What does v2 switch do?

That is for accepting the sdk licence, sometimes it doesn't give you the (Y/n) options to accept the license at log level 1 .

The switch is an optional step if buildozer android debug deploy run still does not run after installing aidl. I am not sure if it won't cause further issues but it works for now.

@alchimiehub
Copy link

ln -s /usr/bin/aidl ~/.buildozer/android/platform/android-sdk-20/build-tools/0/aidl
this worked Great

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

15 participants