qfmeal |
2017-01-10 22:50 |
qt for android 编译hello world 报错
首先代码被编译成so,然后下面ant编译就不动了日志如下:
copy /y libfirstAndroidHelloWorld.so H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\libs\armeabi-v7a\libfirstAndroidHelloWorld.so 已复制 1 个文件。 22:24:39: 进程"H:\Qt\Qt5.7.1\Tools\mingw530_32\bin\mingw32-make.exe"正常退出。 22:24:39: Starting: "H:\Qt\Qt5.7.1\5.7\android_armv7\bin\androiddeployqt.exe" --input H:/QML/build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release/android-libfirstAndroidHelloWorld.so-deployment-settings.json --output H:/QML/build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release/android-build --deployment bundled --android-platform android-25 --jdk C:/JDK/jdk1.6.0_18 --ant C:/apache-ant-1.9.8/bin/ant.bat Generating Android Package Input file: H:/QML/build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release/android-libfirstAndroidHelloWorld.so-deployment-settings.json Output directory: H:/QML/build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release/android-build/ Application binary: H:/QML/build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release/libfirstAndroidHelloWorld.so Android build platform: android-25 Install to device: No Buildfile: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\build.xml
-set-mode-check:
-set-debug-files:
-check-env: [checkenv] Android SDK Tools Revision 25.2.4 [checkenv] Installed at C:\android-sdk
-setup: [echo] Project Name: QtApp [gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup: [getbuildtools] Using latest Build Tools: 25.0.2 [echo] Resolving Build Target for QtApp... [gettarget] Project Target: Android 7.1.1 [gettarget] API level: 25 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\res [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\rsObj [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\rsLibs [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\gen [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\classes [mkdir] Created dir: H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\dexedLibs [echo] ---------- [echo] Resolving Dependencies for QtApp... [dependency] Library dependencies: [dependency] No Libraries [dependency] [dependency] ------------------ [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on
-code-gen: [mergemanifest] Merging AndroidManifest files into one. [mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] Found 2 AIDL files. [aidl] Compiling 2 AIDL files. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... [buildconfig] Generating BuildConfig class.
-pre-compile:
-compile: [javac] Compiling 10 source files to H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\bin\classes [javac] H:\QML\build-firstAndroidHelloWorld-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Release\android-build\src\org\qtproject\qt5\android\bindings\QtActivity.java:39: 无法访问 android.app.Activity [javac] 错误的类文件: android\app\Activity.class(android\app:Activity.class) [javac] 类文件具有错误的版本 52.0,应为 50.0 [javac] 请删除该文件或确保该文件位于正确的类路径子目录中。 [javac] import android.app.Activity; [javac] ^
BUILD FAILED C:\android-sdk\tools\ant\build.xml:716: The following error occurred while executing this line: C:\android-sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
Total time: 1 second Building the android package failed! -- For more information, run this command with --verbose. 22:24:45: 进程"H:\Qt\Qt5.7.1\5.7\android_armv7\bin\androiddeployqt.exe"退出,退出代码 14 。 Error while building/deploying project firstAndroidHelloWorld (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.7.1)) When executing step "Build Android APK" 22:24:45: Elapsed time: 00:07.
|
|