jcconline 发表于 2017-11-23 08:04:19

请问Qt For Android代码运行后出现这样的错误该怎样解决?


-pre-compile:
-compile:    Compiling 10 source files to C:\Users\jcc\Desktop\build-untitled-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_2_for_Android_armv7-Release\android-build\bin\classes    错误: 不再支持源选项 1.5。请使用 1.6 或更高版本。    错误: 不再支持目标选项 1.5。请使用 1.6 或更高版本。
BUILD FAILEDC:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:716: The following error occurred while executing this line:C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Total time: 3 secondsBuilding the android package failed!-- For more information, run this command with --verbose.08:01:15: 进程"D:\Qt5.9.2\5.9.2\android_armv7\bin\androiddeployqt.exe"退出,退出代码 14 。Error while building/deploying project untitled (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.2 for Android armv7))When executing step "Build Android APK"08:01:15: Elapsed time: 00:19.

Since 发表于 2017-11-23 09:33:08

你用了 JNI?还修改了 XML 文件 ?

jcconline 发表于 2017-11-24 08:08:34

Since 发表于 2017-11-23 09:33
你用了 JNI?还修改了 XML 文件 ?

什么都没改,都是默认的。

Since 发表于 2017-11-24 10:25:39

那就是你的 JDK NDK 和 javac 版本不适配导致的,你的空工程都跑不起来,东西太大,不好发给你,你百度一下怎么配吧!

小柏酱 发表于 2020-12-17 16:45:30

应该是你的jdk和qt的版本不匹配导致,我之前装jdk15,也报这个错误,后来换成jdk1.8就好了。你可以看看网上的教程,qt和Android的配置教程
页: [1]
查看完整版本: 请问Qt For Android代码运行后出现这样的错误该怎样解决?