关于Qt for android构建的Failed to GetFullPathName错误

最近在做Qt for android的项目的过程中,运用Qt的自带的例子编译一个qt for android的APK,发现了一个编译错误如下:

> Task :compileDebugAidl FAILED

aidl.exe E 04-24 16:06:20 25348 25020 io_delegate.cpp:50] Failed to GetFullPathName(C:\Qt\Qt5.14.1\Examples\Qt-5.14.1\widgets\painting\build-fontsampler-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android_90ede6-Debug\android-build\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out\org\kde\necessitas\ministro\IMinistro.java)

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':compileDebugAidl'.

> 1 exception was raised by workers:

java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process E:\android_dll\android-sdk-windows\build-tools\28.0.3\aidl.exe with arguments {-pE:\android_dll\android-sdk-windows\platforms\android-29\framework.aidl -oC:\Qt\Qt5.14.1\Examples\Qt-5.14.1\widgets\painting\build-fontsampler-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android_90ede6-Debug\android-build\build\generated\aidl_source_output_dir\debug\compileDebugAidl\out -IC:\Qt\Qt5.14.1\5.14.1\android\src\android\java\src -IC:\Qt\Qt5.14.1\Examples\Qt-5.14.1\widgets\painting\build-fontsampler-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android_90ede6-Debug\android-build\src\debug\aidl -IC:\Qt\Qt5.14.1\Examples\Qt-5.14.1\widgets\painting\build-fontsampler-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android_90ede6-Debug\android-build\src -IC:\Qt\Qt5.14.1\Examples\Qt-5.14.1\widgets\painting\build-fontsampler-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android_90ede6-Debug\android-build\aidl -dC:\Users\Administrator\AppData\Local\Temp\aidl2993109682987047489.d C:\Qt\Qt5.14.1\5.14.1\android\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --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 9s

1 actionable task: 1 executed

Building the android package failed!

-- For more information, run this command with --verbose.

16:06:20: 进程"C:\Qt\Qt5.14.1\5.14.1\android\bin\androiddeployqt.exe"退出,退出代码 14 。

Error while building/deploying project fontsampler (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.1 for Android))

When executing step "Build Android APK"

刚开始也不知道啥问题,然后翻译了一下Failed to GetFullPathName,发现了是不能获取路径的问题,然后就网上的百度了一下,刚好看到了有位大佬的解决方法,究其原因还是这个构建文件夹的路径和文件名称太长了,导致编译的时候编译器无法获取到准确的路径名,所以可以将构建的路径选择到别的文件夹去。

我之前的构建目录:

然后就报错,后面将方框里面的构建目录改成了G:\QMLobject 目录下  成功的解决了这个问题。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值