1

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?
siva82kb
  • 1,910
  • 4
  • 19
  • 28

1 Answers1

1

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.

kitti
  • 14,663
  • 31
  • 49
  • Thank you Ryan. I tried installing python-for-android and ran into a problem during installation. I have provided the details in my question. Can you take a look and tell me what might be the issue with the installation process? – siva82kb May 13 '14 at 11:25
  • 1
    @siva82kb Are you certain the NDK is fully installed? It's not finding the compiler `arm-linux-androideabi-gcc.exe`, which should be located in the first folder in that path (`C:\Users\108354\work\android-ndk-r9d\toolchains\arm-linux-androideabi-4.8\prebuilt\cygwin-x86\bin\`). And did you install the 32-bit NDK? Even on 64-bit systems, you need to use the 32-bit NDK. This is why I would recommend just using the VirtualBox VM, as it is already set up for you. – kitti May 13 '14 at 14:19
  • 1
    Thanks. I finally tried the VM and it worked. I used the VirtualBox VM and was able to setup everything. Thanks. – siva82kb May 13 '14 at 16:26