Installing Python-For-Android Linux Ubuntu, Build Errors
<p>I trying to build a test project just to see if the installation works but I get this error almost instantly.....</p>

<p>/home/kivy/Android/sdk/platform-tools/tools/android</p>

<p>I have installed Android Studio and ran updates.  I installed the 14(android 4.0) tools needed.  I downloaded the NDK and even though Android Studio created a new Android folder with folders like tools, platform, platform-tools, etc I still downloaded the standalone folder Android-Linux (r24.4.1).</p>

<p>Android-Linux and the NDK are sitting at home/documents/sdk_ndk/...</p>

<p>The Android folder created by Android Studio is sitting at home/Android</p>

<p>Android Studio itself is with the NDK and Android-Linux folders.</p>

<p>.bashrc has...</p>

<pre><code>            export ANDROIDSDK=$HOME/Documents/sdk_ndk/android-sdk-r24.4.1
            export ANDROIDNDK=$HOME/Documents/sdk_ndk/android-ndk-r13b
            export ANDROIDAPI="14"
            export ANDROIDNDKVER="r13b"
</code></pre>

<p>I've even tried....</p>

<pre><code>            export ANDROIDSDK=$HOME/Android/sdk
            export ANDROIDNDK=$HOME/Documents/sdk_ndk/android-ndk-r13b
            export ANDROIDAPI="14"
            export ANDROIDNDKVER="r13b"
</code></pre>

<p>Build commands are....</p>

<pre><code>            p4a apk --private ~/Desktop/testapp --package=org.example.myapp --name "testapp" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy
</code></pre>

<p>When I set this...</p>

<pre><code>            export ANDROIDSDK=$HOME/Documents/sdk_ndk/android-sdk-r24.4.1
</code></pre>

<p>Api target 14 is not found.</p>

<p>When I set this...</p>

<p>export ANDROIDSDK=$HOME/Android/sdk</p>

<p>I don't get an api error but I get the path error.</p>

<pre><code>            not found   /home/kivy/Android/sdk/platform-tools/tools/android
</code></pre>

<p>I've even tried...</p>

<pre><code>            export ANDROIDSDK=$HOME/Android/sdk/tools
            export ANDROIDSDK=$HOME/Android/sdk/platform-tools
</code></pre>

<p>-------Update-------------------</p>

<p>I've added the '"' around paths.....</p>

<pre><code>            export ANDROIDSDK="$Home/Documents/sdk_ndk/android-sdk-r24.4.1"
            #export ANDROIDSDK="$Home/Android/sdk"
            export ANDROIDNDK="$Home/Documents/sdk_ndk/android-ndk-r13b"
            export ANDROIDAPI="14"
            export ANDROIDNDKVER="r13b"
</code></pre>

<p>And now get and error saying it cant find /tools/android.  This is strange because there is an Android file in the tools folder.  It doesn't have the .sh extension, but it's there.</p>

<p>Here's the whole terminal output......</p>

<pre><code>            kivy@kivy-VirtualBox:~$ p4a apk --private ~/Desktop/testapp --package=org.urchatty.com --name "testapp" --version 0.1 --bootstrap=sd12 --requirements=python2,kivy
            [INFO]:    This python-for-android revamp is an experimental alpha release!
            [INFO]:    It should work (mostly), but you may experience missing features or bugs.
            [INFO]:    Will compile for the following archs: armeabi
            [INFO]:    Found Android API target in $ANDROIDAPI
            Traceback (most recent call last):
              File "/usr/local/bin/p4a", line 9, in &lt;module&gt;
                load_entry_point('python-for-android==0.4', 'console_scripts', 'p4a')()
              File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 754, in main
                ToolchainCL()
              File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 343, in __init__
                getattr(self, command_method_name)(unknown)
              File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 87, in wrapper_func
                user_ndk_ver=self.ndk_version)
              File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/build.py", line 226, in prepare_build_environment
                android = sh.Command(join(sdk_dir, 'tools', 'android'))
              File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1029, in __init__
                raise CommandNotFound(path)
            sh.CommandNotFound: /Documents/sdk_ndk/android-sdk-r24.4.1/tools/android
            kivy@kivy-VirtualBox:~$ 
</code></pre>

<p>---------Update-------------------------</p>

<p>Seems like my paths in the bashrc had to be written as....  "/home/kivy/....".  I didn't get far before another error hit me....</p>

<pre><code>            kivy@kivy-VirtualBox:~$ p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy
            [INFO]:    This python-for-android revamp is an experimental alpha release!
            [INFO]:    It should work (mostly), but you may experience missing features or bugs.
            [INFO]:    Will compile for the following archs: armeabi
            [INFO]:    Found Android API target in $ANDROIDAPI
            [INFO]:    Available Android APIs are (4, 19)
            [INFO]:    Requested API target 19 is available, continuing.
            [INFO]:    Found NDK dir in $ANDROIDNDK
            [INFO]:    Got NDK version from $ANDROIDNDKVER
            [INFO]:    Using Google NDK r13b
            [INFO]:    Found virtualenv at /usr/local/bin/virtualenv
            [WARNING]: ndk_platform doesn't exist: /home.kivy/Documents/android-ndk-r13b/platforms/android-19/arch-arm
            [WARNING]: Could not find toolchain subdirectory!
            [WARNING]: Could not find any toolchain for arm-linux-androideabi!
            [WARNING]: Missing executable: autoconf is not installed
            [WARNING]: Missing executable: automake is not installed
            [WARNING]: Missing executable: libtoolize is not installed
            [ERROR]:   python-for-android cannot continue; aborting
            kivy@kivy-VirtualBox:~$ 
</code></pre>