Question

I need to access the bluetooth on Android in my Kivy app.

I am trying to setup pyjnius on Windows for developing my app. I downloaded pyjnius from GitHub and tried to setup it up for python in the kivy folder.

enter image description here

Following the setup, I tried to run the tests and I get an error that I don't understand.

I am very new to Android development, and can´t quite understand what might be problem.

What am I doing wrong in my installation process? I have JRE and JDK installed in my PC.

--- Edited on May 13 2014 ---

Following Ryan´s suggestion, I tried to install python for android on Window 7.

I downloaded the Android SDK API14 and the NDK and setting up the following environment variables:

ANDROIDSDK = D:\Users\108354\work\android_sdk\adt-bundle-windows-x86-20140321\sdk
ADROIDNDK = D:\Users\108354\work\android-ndk-r9d
ANDROIDNDKVER = r9
ANDROIDAPI = 14

I cloned the github repository and executed the following command:

./distribute.sh -m "kivy" 

But when I do this, I run into the following error:

enter image description here

I have setup the directories for the SDK and NDK correctly and have API14.

  1. What am I missing?
  2. Why do you I get this error?
  3. What do I need to do resolve this problem?
Was it helpful?

Solution

You don't need to install pyjnius. If you want to use Kivy on Android, you should use the python-for-android project. P4A already includes pyjnius and Kivy, and has scripts to include other Python modules and to create an APK from your application.

python-for-android also provides a VirtualBox VM, which can make this process much easier for Windows users.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top