使用Buildozer打包Kivy应用时出现“no signature of method”错误
Buildozer打包Android应用时Gradle方法签名不匹配报错
错误日志:
[INFO]: Detected highest available build tools version to be 33.0.0 [DEBUG]: -> running gradlew assembleDebug [DEBUG]: [DEBUG]: > Configure project : [DEBUG]: WARNING:Using flatDir should be avoided because it doesn''t support any meta-data formats. [DEBUG]: [DEBUG]: FAILURE: Build failed with an exception. [DEBUG]: [DEBUG]: * Where: [DEBUG]: Build file '/home/mbryce/farmboy-job-info-submission/.buildozer/android/platform/build-arm64-v8a/dists/hfejobsub/build.gradle' line: 26 [DEBUG]: [DEBUG]: * What went wrong: [DEBUG]: A problem occurred evaluating root project 'hfejobsub'. [DEBUG]: > No signature of method: build_c9xl77lb02eyhioqx2cj4uwui.android() is applicable for argument types: (build_c9xl77lb02eyhioqx2cj4uwui$_run_closure2) values: [build_c9xl77lb02eyhioqx2cj4uwui$_run_closure2@6a5085f5] [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
问题详情:
- Python代码在Windows本地运行完全正常,排除代码本身问题,确定错误出在Buildozer打包流程中。
- 报错中的
build_c9xl77lb02eyhioqx2cj4uwui.android()是自动生成的函数,代码中从未定义过,推测和Python转Java的转换机制有关。 - 当前环境为WSL(Debian 11),已全新安装Buildozer且未使用虚拟环境;试过删除整个
.buildozer目录后重新打包,问题仍然存在。 - 本人对Java相关知识了解有限,不知道该从哪些方向排查错误原因。
内容的提问来源于stack exchange,提问作者AllAboutMike
相关产品推荐
相关产品推荐

