Python 3.x Kivy虚拟机构建器

Python 3.x Kivy虚拟机构建器,python-3.x,virtual-machine,kivy,buildozer,Python 3.x,Virtual Machine,Kivy,Buildozer,我需要你的帮助,因为我有一个kivy应用程序,我正在尝试在VM中使用buildozer。 (如果您感兴趣,我会遵循以下步骤:) 我的代码是用Python3编写的,因此我下载了Crystax NDK,如自述文件中所述: 仍然根据ReadMe,我更改了buildozer.spec中的以下行: 要求=蟒蛇,克维 android.ndk_path=/home/kivy/Desktop/crystax-ndk-10.3.2 执行:buildozer android_new debug后出现以下错误: id

我需要你的帮助,因为我有一个kivy应用程序,我正在尝试在VM中使用buildozer。 (如果您感兴趣,我会遵循以下步骤:)

我的代码是用Python3编写的,因此我下载了Crystax NDK,如自述文件中所述:

仍然根据ReadMe,我更改了buildozer.spec中的以下行: 要求=蟒蛇,克维 android.ndk_path=/home/kivy/Desktop/crystax-ndk-10.3.2

执行:buildozer android_new debug后出现以下错误:

id: 124 or "sys-img-x86-android-15"
     Type: SystemImage
     Desc: Intel x86 Atom System Image
           Revision 4
           Requires SDK Platform Android API 15
----------
id: 125 or "sys-img-mips-android-15"
     Type: SystemImage
     Desc: MIPS System Image
           Revision 1
           Requires SDK Platform Android API 15
----------
id: 126 or "sys-img-armeabi-v7a-google_apis-15"
     Type: SystemImage
     Desc: Google APIs ARM EABI v7a System Image
           Revision 5
           Requires SDK Platform Android API 15
----------
id: 127 or "sys-img-x86-google_apis-15"
     Type: SystemImage
     Desc: Google APIs Intel x86 Atom System Image
           Revision 5
           Requires SDK Platform Android API 15
----------
id: 128 or "sys-img-armeabi-v7a-android-14"
     Type: SystemImage
     Desc: ARM EABI v7a System Image
           Revision 2
           Requires SDK Platform Android API 14
----------
id: 129 or "sys-img-armeabi-v7a-android-10"
     Type: SystemImage
     Desc: ARM EABI v7a System Image
           Revision 4
           Requires SDK Platform Android API 10
----------
id: 130 or "sys-img-x86-android-10"
     Type: SystemImage
     Desc: Intel x86 Atom System Image
           Revision 4
           Requires SDK Platform Android API 10
----------
id: 131 or "sys-img-armeabi-v7a-google_apis-10"
     Type: SystemImage
     Desc: Google APIs ARM EABI v7a System Image
           Revision 5
           Requires SDK Platform Android API 10
----------
id: 132 or "sys-img-x86-google_apis-10"
     Type: SystemImage
     Desc: Google APIs Intel x86 Atom System Image
           Revision 5
           Requires SDK Platform Android API 10
----------
id: 133 or "addon-google_apis-google-24"
     Type: Addon
     Desc: Google APIs, Android API 24, revision 1
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 24
----------
id: 134 or "addon-google_apis-google-23"
     Type: Addon
     Desc: Google APIs, Android API 23, revision 1
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 23
----------
id: 135 or "addon-google_apis-google-22"
     Type: Addon
     Desc: Google APIs, Android API 22, revision 1
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 22
----------
id: 136 or "addon-google_apis-google-21"
     Type: Addon
     Desc: Google APIs, Android API 21, revision 1
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 21
----------
id: 137 or "addon-google_apis-google-19"
     Type: Addon
     Desc: Google APIs, Android API 19, revision 20
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 19
----------
id: 138 or "addon-google_gdk-google-19"
     Type: Addon
     Desc: Glass Development Kit Preview, Android API 19, revision 11
           By Google Inc.
           Preview of the Glass Development Kit
           Requires SDK Platform Android API 19
----------
id: 139 or "addon-google_apis-google-18"
     Type: Addon
     Desc: Google APIs, Android API 18, revision 4
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 18
----------
id: 140 or "addon-google_apis-google-17"
     Type: Addon
     Desc: Google APIs, Android API 17, revision 4
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 17
----------
id: 141 or "addon-google_apis-google-16"
     Type: Addon
     Desc: Google APIs, Android API 16, revision 4
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 16
----------
id: 142 or "addon-google_apis-google-15"
     Type: Addon
     Desc: Google APIs, Android API 15, revision 3
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 15
----------
id: 143 or "addon-google_apis-google-14"
     Type: Addon
     Desc: Google APIs, Android API 14, revision 2 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 14
----------
id: 144 or "addon-google_apis-google-13"
     Type: Addon
     Desc: Google APIs, Android API 13, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 13
----------
id: 145 or "addon-google_tv_addon-google-13"
     Type: Addon
     Desc: Google TV Addon, Android API 13, revision 1 (Obsolete)
           By Google Inc.
           Requires SDK Platform Android API 13
----------
id: 146 or "addon-google_apis-google-12"
     Type: Addon
     Desc: Google APIs, Android API 12, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 12
----------
id: 147 or "addon-google_tv_addon-google-12"
     Type: Addon
     Desc: Google TV Addon, Android API 12, revision 2 (Obsolete)
           By Google Inc.
           Requires SDK Platform Android API 12
----------
id: 148 or "addon-google_apis-google-11"
     Type: Addon
     Desc: Google APIs, Android API 11, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 11
----------
id: 149 or "addon-google_apis-google-10"
     Type: Addon
     Desc: Google APIs, Android API 10, revision 2 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 10
----------
id: 150 or "addon-google_apis-google-9"
     Type: Addon
     Desc: Google APIs, Android API 9, revision 2 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 9
----------
id: 151 or "addon-google_apis-google-8"
     Type: Addon
     Desc: Google APIs, Android API 8, revision 2 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 8
----------
id: 152 or "addon-google_apis-google-7"
     Type: Addon
     Desc: Google APIs, Android API 7, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 7
----------
id: 153 or "addon-google_apis-google-6"
     Type: Addon
     Desc: Google APIs, Android API 6, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 6
----------
id: 154 or "addon-google_apis-google-5"
     Type: Addon
     Desc: Google APIs, Android API 5, revision 1 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 5
----------
id: 155 or "addon-google_apis-google-4"
     Type: Addon
     Desc: Google APIs, Android API 4, revision 2 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 4
----------
id: 156 or "addon-google_apis-google-3"
     Type: Addon
     Desc: Google APIs, Android API 3, revision 3 (Obsolete)
           By Google Inc.
           Android + Google APIs
           Requires SDK Platform Android API 3
----------
id: 157 or "source-25"
     Type: Source
     Desc: Sources for Android SDK, API 25, revision 1
----------
id: 158 or "source-24"
     Type: Source
     Desc: Sources for Android SDK, API 24, revision 1
----------
id: 159 or "source-23"
     Type: Source
     Desc: Sources for Android SDK, API 23, revision 1
----------
id: 160 or "source-22"
     Type: Source
     Desc: Sources for Android SDK, API 22, revision 1
----------
id: 161 or "source-21"
     Type: Source
     Desc: Sources for Android SDK, API 21, revision 1
----------
id: 162 or "source-20"
     Type: Source
     Desc: Sources for Android SDK, API 20, revision 1
----------
id: 163 or "source-19"
     Type: Source
     Desc: Sources for Android SDK, API 19, revision 2
----------
id: 164 or "source-18"
     Type: Source
     Desc: Sources for Android SDK, API 18, revision 1
----------
id: 165 or "source-17"
     Type: Source
     Desc: Sources for Android SDK, API 17, revision 1
----------
id: 166 or "source-16"
     Type: Source
     Desc: Sources for Android SDK, API 16, revision 2
----------
id: 167 or "source-15"
     Type: Source
     Desc: Sources for Android SDK, API 15, revision 2
----------
id: 168 or "source-14"
     Type: Source
     Desc: Sources for Android SDK, API 14, revision 1 (Obsolete)
----------
id: 169 or "extra-android-m2repository"
     Type: Extra
     Desc: Android Support Repository, revision 47
           By Android
           Local Maven repository for Support Libraries
           Install path: extras/android/m2repository
----------
id: 170 or "extra-google-admob_ads_sdk"
     Type: Extra
     Desc: Google AdMob Ads SDK, revision 11 (Obsolete)
           By Google Inc.
           AdMob Ads SDK
           Install path: extras/google/admob_ads_sdk
----------
id: 171 or "extra-google-analytics_sdk_v2"
     Type: Extra
     Desc: Google Analytics App Tracking SDK, revision 3 (Obsolete)
           By Google Inc.
           Analytics App Tracking SDK
           Install path: extras/google/analytics_sdk_v2
----------
id: 172 or "extra-google-auto"
     Type: Extra
     Desc: Android Auto Desktop Head Unit emulator, revision 1.1
           By Google Inc.
           Head unit emulator for developers targeting the Android Auto
           platform.
           Install path: extras/google/auto
----------
id: 173 or "extra-google-gcm"
     Type: Extra
     Desc: Google Cloud Messaging for Android Library, revision 3 (Obsolete)
           By Google Inc.
           GCM library has been moved to Google Play Services
           (com.google.android.gms.gcm) and this standalone version is no
           longer supported
           Install path: extras/google/gcm
----------
id: 174 or "extra-google-google_play_services_froyo"
     Type: Extra
     Desc: Google Play services for Froyo, revision 12 (Obsolete)
           By Google Inc.
           Google Play services client library and sample code
           Install path: extras/google/google_play_services_froyo
----------
id: 175 or "extra-google-google_play_services"
     Type: Extra
     Desc: Google Play services, revision 42
           By Google Inc.
           Google Play services Javadocs and sample code
           Install path: extras/google/google_play_services
----------
id: 176 or "extra-google-instantapps"
     Type: Extra
     Desc: Instant Apps Development SDK, revision 1
           By Google Inc.
           Android Instant Apps Development SDK
           Install path: extras/google/instantapps
----------
id: 177 or "extra-google-m2repository"
     Type: Extra
     Desc: Google Repository, revision 55
           By Google Inc.
           Local Maven repository for Support Libraries
           Install path: extras/google/m2repository
----------
id: 178 or "extra-google-market_apk_expansion"
     Type: Extra
     Desc: Google Play APK Expansion library, revision 1
           By Google Inc.
           Android Market APK Expansion library
           Install path: extras/google/market_apk_expansion
----------
id: 179 or "extra-google-market_licensing"
     Type: Extra
     Desc: Google Play Licensing Library, revision 1
           By google
           Android Market Licensing client library
           Install path: extras/google/market_licensing
----------
id: 180 or "extra-google-play_billing"
     Type: Extra
     Desc: Google Play Billing Library, revision 5
           By Google Inc.
           Google Play Billing files and sample code
           Install path: extras/google/play_billing
----------
id: 181 or "extra-google-simulators"
     Type: Extra
     Desc: Android Auto API Simulators, revision 1
           By Google Inc.
           Android Auto API testing simulators
           Install path: extras/google/simulators
----------
id: 182 or "extra-google-webdriver"
     Type: Extra
     Desc: Google Web Driver, revision 2
           By Google Inc.
           Install path: extras/google/webdriver

# Check that aidl can be executed
# Search for Aidl
# Run '/home/kivy/.buildozer/android/platform/android-sdk-20/build-tools/26.0.0/aidl'
# Cwd None
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Run 'python -m pythonforandroid.toolchain --color=always --storage-dir=/home/kivy/Desktop/New Folder2/.buildozer/android/platform/build create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs'
# Cwd /home/kivy/Desktop/New Folder2/.buildozer/android/platform/python-for-android-master
usage: toolchain.py [-h]
                    {recipes,bootstraps,clean_all,clean_dists,clean_bootstrap_builds,clean_builds,clean,clean_recipe_build,clean_download_cache,export_dist,apk,create,archs,distributions,delete_dist,sdk_tools,adb,logcat,build_status}
                    ...
toolchain.py: error: argument subparser_name: invalid choice: 'Folder2/.buildozer/android/platform/build' (choose from 'recipes', 'bootstraps', 'clean_all', 'clean_dists', 'clean_bootstrap_builds', 'clean_builds', 'clean', 'clean_recipe_build', 'clean_download_cache', 'export_dist', 'apk', 'create', 'archs', 'distributions', 'delete_dist', 'sdk_tools', 'adb', 'logcat', 'build_status')
# Command failed: python -m pythonforandroid.toolchain --color=always --storage-dir=/home/kivy/Desktop/New Folder2/.buildozer/android/platform/build create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs
# 

# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy@kivyvm:~/Desktop/New Folder2$ 
非常感谢你的帮助

python代码(kivy示例):


尽管如此,蟒蛇3号仍在基维进行实验。


如果你能在Python2中工作,最好尝试一下。

你发布了错误,但没有发布代码。我们能帮上什么忙吗?抱歉,只是因为我不认为代码中可能有错误。我使用了一个kivy的例子:
from random import random
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.graphics import Color, Ellipse, Line


class MyPaintWidget(Widget):

    def on_touch_down(self, touch):
        color = (random(), 1, 1)
        with self.canvas:
            Color(*color, mode='hsv')
            d = 30.
            Ellipse(pos=(touch.x - d / 2, touch.y - d / 2), size=(d, d))
            touch.ud['line'] = Line(points=(touch.x, touch.y))

    def on_touch_move(self, touch):
        touch.ud['line'].points += [touch.x, touch.y]


class MyPaintApp(App):

    def build(self):
        parent = Widget()
        self.painter = MyPaintWidget()
        clearbtn = Button(text='Clear')
        clearbtn.bind(on_release=self.clear_canvas)
        parent.add_widget(self.painter)
        parent.add_widget(clearbtn)
        return parent

    def clear_canvas(self, obj):
        self.painter.canvas.clear()


if __name__ == '__main__':
    MyPaintApp().run()