Как включить файл .aar в проект Kivy/Buildozer AndroidPython

Программы на Python
Ответить
Anonymous
 Как включить файл .aar в проект Kivy/Buildozer Android

Сообщение Anonymous »

Я хотел бы добавить файл .aar (onnxruntime.aar) в свой проект Kivy. Структура моего проекта:

Код: Выделить всё

├── buildozer.spec
├── dress.jpg
├── libs
│   └── onnxruntime.aar
├── log.txt
├── main.py
├── __pycache__
│   ├── temp3.cpython-310.pyc
│   ├── temp3.cpython-39.pyc
│   ├── tflite_models2.cpython-310.pyc
│   ├── tflite_models2.cpython-39.pyc
│   └── tflite_models.cpython-39.pyc
├── temp3.py
└── tflite_models2.py
В моем buildozer.spec у меня есть:

Код: Выделить всё

[app]

# (str) Title of your application
title = Test_onnx_image

# (str) Package name
package.name = test_onnx

# (str) Package domain (needed for android/ios packaging)
package.domain = org.test

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,aar

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy==2.3.1,numpy,filetype,plyer,pillow,pyjnius
android.requirements.source.pyjnius = https://github.com/kivy/pyjnius/archive/refs/heads/master.zip

# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
android.add_aars = android.add_aars = libs/onnxruntime.aar
Но когда я пытаюсь собрать .APK:

buildozer -v android debug

я получаю следующую ошибку:

Код: Выделить всё

[INFO]: Detected highest available build tools version to be 36.1.0
[DEBUG]: -> running gradlew clean assembleDebug
[DEBUG]: > Task :checkDebugAarMetadata FAILED
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':checkDebugAarMetadata'.
[DEBUG]: > Could not resolve all files for configuration':debugRuntimeClasspath'.
[DEBUG]: > Could not find :onnxruntime:.
[DEBUG]: Required by:
[DEBUG]: project :
[DEBUG]:
[DEBUG]: * Try:
[DEBUG]: > Run with --stacktrace option to get the stack trace.
[DEBUG]: > Run with --info or --debug option to get more log output.
[DEBUG]: > Run with --scan to get full insights.
[DEBUG]:
[DEBUG]: * Get more help at https://help.gradle.org/
[DEBUG]:
[DEBUG]: Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[DEBUG]:
[DEBUG]: You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[DEBUG]:
[DEBUG]: See https://docs.gradle.org/8.0.2/userguide/command_line_interface.html#sec:command_line_warnings
что я делаю не так?


Подробнее здесь: https://stackoverflow.com/questions/797 ... id-project
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Python»