How to create stand-alone android apps

53 views
Skip to first unread message

Charles Plager

unread,
Apr 11, 2018, 7:25:44 PM4/11/18
to Kivy users support
Hi,

I'm at something of a loss trying to build stand-alone android apps.

1) The Virtual box virtual machine doesn't run.

2) There's (apparently) a bug in buildozer that requires the 'android' command which hasn't been around since android SDK 19 (where 20 is downloaded by buildozer).

I'm trying to do this on Ubuntu (running on Windows).  Any suggestions?  Is there a way to install Android SDK 19? 

Thanks,
Charles

ZenCODE

unread,
Apr 12, 2018, 7:00:26 AM4/12/18
to Kivy users support
Yes Just specify 

    android.api = 19

in your buildozer.spec file. The VM does works for many, but running the VM requires hardware and setting that are outside of Kivy's control. Here is another VM with API 19 pre-installed.

Charles Plager

unread,
Apr 12, 2018, 7:06:40 PM4/12/18
to Kivy users support


On Thursday, April 12, 2018 at 7:00:26 AM UTC-4, ZenCODE wrote:
Yes Just specify 

    android.api = 19

in your buildozer.spec file.
 
O.k..  So android is now installed.  Now it's complaining about aidl not being installed (even though it is in path).

Is there somewhere I can link it so that it uses the one I already have installed?  any other ideas? 

Output and spec file attached.  (Anything stupid I've set?)

Thanks!
  Charles
buildozer.spec
log.txt

Charles Plager

unread,
Apr 12, 2018, 7:32:11 PM4/12/18
to Kivy users support


On Thursday, April 12, 2018 at 7:00:26 AM UTC-4, ZenCODE wrote:
 Here is another VM with API 19 pre-installed.


I get the following error:

Failed to open a session for the virtual machine Kivy Complete VM.

Implementation of the USB 2.0 controller not found!

Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings.

Note! This error could also mean that an incompatible version of the 'Oracle VM VirtualBox Extension Pack' is installed (VERR_NOT_FOUND).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

I just downloaded Virtual Box 5.2.8 (and have no experience running it).

I reloaded the one I downloaded from official site and get a new error when trying to run that:

VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.


Running an i5-3470 wit 8 GB of RAM.

Charles Plager

unread,
Apr 14, 2018, 3:30:07 PM4/14/18
to Kivy users support


On Thursday, April 12, 2018 at 7:06:40 PM UTC-4, Charles Plager wrote:
O.k..  So android is now installed.  Now it's complaining about aidl not being installed (even though it is in path).

Is there somewhere I can link it so that it uses the one I already have installed?  any other ideas? 

O.k.  I got past this by soft-linking aidl in the right place (from this hint):

mkdir -p ~/.buildozer/android/platform/android-sdk-20/build-tools/0

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

Now it fails saying it can't find and android APIs (see tail of error below).

I've attached currrent spec and log output. 

Any ideas?


Thanks,

  Charles

# Compile platform

# Run '/usr/bin/python2.7 -m pythonforandroid.toolchain create --dist_name=mathtest --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/cplager/WindowsPython/build/.buildozer/android/platform/build'

# Cwd /home/cplager/WindowsPython/build/.buildozer/android/platform/python-for-android-new-toolchain

[INFO]:    Will compile for the following archs: armeabi-v7a

[INFO]:    Found Android API target in $ANDROIDAPI

[INFO]:    Available Android APIs are ()

[WARNING]: Requested API target 19 is not available, install it with the SDK android tool.

[WARNING]: Exiting.

build.txt
buildozer.spec

Charles Plager

unread,
Apr 14, 2018, 6:21:45 PM4/14/18
to Kivy users support
Ok.  I'm (I believe) closer and have much cleaner instructions for anyone who wants to get this far.

* Download V25 SDK (Version 26 has this problem)

  • Download V25 SDK (Version 26 has this problem)
  • Tell it to install V24 API
  • Soft-link already installed aidl
  • Build.(Complete history in shortHistory.txt attached).

The problem now is that I get (full error in error.txt; full build log is build.out)
BUILD FAILED
/home/cplager/.buildozer/android/platform/android-sdk-25.2.5/tools/ant/build.xml:483: SDK does not have any Build Tools installed.

Spec file is also attached.

Any hints?

Thanks,
  Charles

buildozer.spec
shortHistory.txt
error.txt
build.out

ZenCODE

unread,
Apr 19, 2018, 2:59:33 PM4/19/18
to Kivy users support
Try running the android tool and install the build tools. The android tool is usually located in

/home/<username>/.buildozer/android/platform/android-sdk-24/tools/
Reply all
Reply to author
Forward
0 new messages