1

I am trying to run buildozer. While running it gave the following error:

Aidl not found, please install it.  

So I tried to install aidl as described here But it gave me the following error

E: Unable to locate package aidl

I have updated the package index by sudo apt-get update,but stil it is not working. How can I install aidl?

3 Answers3

1

First of all, there's very specific versions of Cython required so make sure you use the appropriate Ubuntu dependencies installation from this site

For Ubuntu 16.04 it is:

sudo pip install --upgrade cython==0.21
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386

Then if you still get an issue, try running the android SDK Manager GUI and manually installing the dependencies:

~/.buildozer/android/platform/android-sdk-20/tools/android

Replace android-sdk-20 with your version

enter image description here

Then I had to delete the OLD version first, and then reinstall a later version of the SDK and rerun it

For Windows WSL Ubuntu

If running withing Windows Ubuntu WSL you can still do this, just:

On Windows Run XLaunch (from Xming X Server for Windows)

Then in WSL Ubuntu prompt (I use hyper.js):

export DISPLAY=localhost:0

Last resort

If you still can't get buildozer to run, you can try the kivy VM at the bottom of this download page (requires Virtual Box and possibly a BIOS change to enable virtualization)

Jonathan
  • 3,904
1

Finally, I have found the solution. To install aidl, you need libstdc++-6. Previously I had a lower version of libstdc++, which causes problems while installing aidl.

To update to libstdc++-6, try

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libstdc++6

After this, you will have libstdc++6 installed.now you can simply install the aidl by typing:

sudo apt-get install aidl 
  • This should be a reported as a bug, because aidl should mark in it's *.deb file all it's dependancies – Jonathan Aug 09 '18 at 23:42
0

I was trying to compile for SDK 28, didn't have build-tools folder at all, so I had to run this:

~/./.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;28.0.0"

That command installed build tools with aidl inside build-tools folder and fixed the issue.