简体   繁体   English

由于 gradle 错误,无法使用 Qt Creator 构建 APK

[英]Can't build APK using Qt Creator due to gradle error

I am trying to build a project for Android on MacOS with Qt Creator 4.14, Qt 5.15.2, NDK 3.0, SDK 21.3.6528147. I am trying to build a project for Android on MacOS with Qt Creator 4.14, Qt 5.15.2, NDK 3.0, SDK 21.3.6528147. Qt shows green checkmarks for Java/Android/OpenSSL Qt 显示 Java/Android/OpenSSL 的绿色复选标记

When I compile my app I see these errors during the "Generating Android Package" step (I think that's gradle called by qtdeployandroid):当我编译我的应用程序时,我在“生成 Android 包”步骤中看到这些错误(我认为这是由 qtdeployandroid 调用的 gradle):

Initialized native services in: /Users/admin/.gradle/native
The client will now receive all logging from the daemon (pid: 1778). The daemon log file: /Users/admin/.gradle/daemon/5.6.4/daemon-1778.out.log
Starting 9th build in daemon [uptime: 53 mins 14.777 secs, performance: 99%]
Using 2 worker leases.

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 971ms
Building the android package failed!
20:04:18: The process "/Users/admin/Qt/5.15.2/android/bin/androiddeployqt" exited with code 14.
Error while building/deploying project BFChristmasParty (kit: Android Qt 5.15.2 Clang Multi-Abi)
When executing step "Build Android APK"
20:04:18: Elapsed time: 01:42.

My project resides on a SMB share in case that matters.我的项目驻留在 SMB 共享上,以防万一。

Check permissions of /Users/admin/.gradle/native ... and you can navigate to the directory and then run ./gradlew assembleDebug --stacktrace (it may also be gradle or assemble , depending how it is set up).检查/Users/admin/.gradle/native ... 的权限,您可以导航到该目录,然后运行./gradlew assembleDebug --stacktrace (它也可能是gradleassemble ,具体取决于它的设置方式)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM