[英]Installing pyjnius on Windows
I need to access the bluetooth on Android in my Kivy app. 我需要在我的Kivy应用中访问Android上的蓝牙。
I am trying to setup pyjnius on Windows for developing my app. 我正在尝试在Windows上设置pyjnius以开发我的应用程序。 I downloaded pyjnius from GitHub and tried to setup it up for python in the kivy folder. 我从GitHub下载pyjnius,并尝试在kivy文件夹中为python进行设置。
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. 我对Android开发非常陌生,并且不太了解可能是什么问题。
What am I doing wrong in my installation process? 安装过程中我在做什么错? I have JRE and JDK installed in my PC. 我的PC中安装了JRE和JDK。
--- Edited on May 13 2014 --- - 编辑于2014年5月13日 -
Following Ryan´s suggestion, I tried to install python for android on Window 7. 按照Ryan的建议,我尝试在Windows 7上为Android安装python。
I downloaded the Android SDK API14 and the NDK and setting up the following environment variables: 我下载了Android SDK API14和NDK,并设置了以下环境变量:
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: 我克隆了github存储库并执行以下命令:
./distribute.sh -m "kivy"
But when I do this, I run into the following error: 但是,当我这样做时,我遇到了以下错误:
I have setup the directories for the SDK and NDK correctly and have API14. 我已经正确设置了SDK和NDK的目录,并具有API14。
You don't need to install pyjnius. 您不需要安装pyjnius。 If you want to use Kivy on Android, you should use the python-for-android project. 如果要在Android上使用Kivy,则应使用python-for-android项目。 P4A already includes pyjnius and Kivy, and has scripts to include other Python modules and to create an APK from your application. P4A已经包含pyjnius和Kivy,并且具有包含其他Python模块并从您的应用程序创建APK的脚本。
python-for-android also provides a VirtualBox VM , which can make this process much easier for Windows users. python-for-android还提供了VirtualBox VM ,它可以使Windows用户更轻松地完成此过程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.