Buildozer:手动包括外部API [英] Buildozer: manually include an external API

查看:308
本文介绍了Buildozer:手动包括外部API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包括SDK库到构建并不在PIP存在,或者在互联网上的任何公共场所。我读过,这是可以手动完成。我把SDK库在我Kivy项目的根目录。开发控制台发现此导入就好了。问题是与部署。

纵观buildozer.spec文件我碰到这样的:

 #(STR)的要求,自定义源文件夹
#设置自定义源的食谱任何要求
#requirements.source.kivy = ../../kivy
 

我有一个名为SDK在我的项目的根文件夹中的SDK,所以我想这样的:

requirements.source.sdk = SDK

它编译没有错误,但是当试图导入它的应用程序崩溃。

如何手动包括我的APK的SDK库?

解决方案

嘛!你已经想通了答案的把SDK文件夹中的项目文件夹。

我写这个答案,帮助别人的未来。 :)

每当部署一个应用程序在设备上,使用日志总是容易的和有用的。

即使你想看到你的应用程序中的打印语句,你就总能找到日志很有用的。

所以,这里是你如何做到这一点。

您需要使用adb服务器。

  1. 连接你的android您的笔记本电脑/ PC。

  2. 该杀开发商选择并打开保持清醒USB调试选项

  3. 在终端输入sudo亚行杀服务器然后须藤亚行启动服务器。
  4. 类型ADB设备(已连接的设备,这将给列表)
  

连接的设备列表

     

you_d​​evice_name设备

  • cd到你的文件夹,你取得了你的身材。
  • 键入 buildozer Android的调试部署运行logcat的> logcat.txt 这样可以节省日志(整个过程)在同一个文件夹中的文件logcat.txt。 通过它,并找到自己的错误。
  • 将手机醒了。(不锁定)。
  • 编码快乐:)

    I'd like to include an SDK library into the build that does not exist in PIP, or any public place on the Internet. I've read that this can be done manually. I put the SDK library in the root of my Kivy project. The development console finds this import just fine. The problem is with the deployment.

    Looking at the buildozer.spec file I came across this:

    # (str) Custom source folders for requirements
    # Sets custom source for any requirements with recipes
    # requirements.source.kivy = ../../kivy
    

    I have the SDK in a folder called sdk in the root of my project, hence I tried this:

    requirements.source.sdk = sdk

    It compiles without errors, but the application crashes when trying to import it.

    How do I manually include an SDK library in to my APK?

    解决方案

    Well! you already figured out the answer that's put the SDK folder in your project folder.

    I write this answer to help someone in future. :)

    Whenever you deploy an application on your device, using logs is always easy and useful.

    Even if you want to see the print statements in your application you would always find logs useful.

    So, here's how you do it.

    you need to use adb server.

    1. Connect your android with your laptop/pc.

    2. Got to developer options and turn on the stay awake and USB debugging options

    3. In your terminal type sudo adb-kill server then sudo adb-start server.
    4. Type adb devices(this should give list of devices connected)

    List of devices attached

    you_device_name device

    1. cd to your folder where you have made your build.
    2. Type buildozer android debug deploy run logcat > logcat.txt this saves the logs (for the entire process) in a file logcat.txt in the same folder. go through it and find your error.
    3. Keep your phone awake.(do not lock it).

    Happy coding :)

    这篇关于Buildozer:手动包括外部API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆