Installing pyjnius on Windows

不打扰是莪最后的温柔 提交于 2021-02-11 07:12:03

问题


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?

回答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.



来源:https://stackoverflow.com/questions/23546283/installing-pyjnius-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!