Russian Qt Forum

Qt => Qt Embedded => Тема начата: __Heaven__ от Октябрь 26, 2014, 18:38



Название: Ошибка установки проекта
Отправлено: __Heaven__ от Октябрь 26, 2014, 18:38
Привет, друзья!
Не так давно ставил компоненты для разработки на android с использованием Qt из-под Ubuntu. Особо мноо поиграть не успел ввиду отсутствия необходимости срочного портирования.
Сейчас систему снес и поставил заново. Ubuntu 14.04. С помощью онлайн установщика поставил Qt 5.3.2. Далее следовал по инструкции Qt for android (http://qt-project.org/doc/qt-5/androidgs.html). Скачал sdk, ndk для 64, установил open jdk 6, ant.
В путях в настройках qtcreator для android прописал:
Размещение JDK: /usr/lib/jvm/java-6-openjdk-amd64
Размещение SDK: /opt/android-sdk-linux
Размещение NDK: /opt/android-ndk-r10c
Программа ant: /usr/bin/ant
В этом же окне пишет предупреждение, что отсутствует профиль Qt для архитектуры mips, что я игнорирую.
Добавил виртуальое устройство и подсоединил свой телефон по USB.
Сборка проекта происходит успешно, но как только начинается установка на какое-либо устройство выскакивает ошибка:
Цитировать
16:57:38: Выполняются этапы для проекта hellogl_es2...
16:57:38: Запускается: «/opt/Qt/5.3/android_armv5/bin/qmake» /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/hellogl_es2.pro -r -spec android-g++
16:57:39: Процесс «/opt/Qt/5.3/android_armv5/bin/qmake» завершился успешно.
16:57:39: Запускается: «/usr/bin/make»
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o main.o /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/main.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o glwidget.o /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/glwidget.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o mainwindow.o /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/mainwindow.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o bubble.o /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/bubble.cpp
/opt/Qt/5.3/android_armv5/bin/rcc -name texture /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/texture.qrc -o qrc_texture.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o qrc_texture.o qrc_texture.cpp
/opt/Qt/5.3/android_armv5/bin/moc -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include -I/opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include-fixed -I/opt/android/ndk/platforms/android-9/arch-arm/usr/include /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/glwidget.h -o moc_glwidget.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o moc_glwidget.o moc_glwidget.cpp
/opt/Qt/5.3/android_armv5/bin/moc -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include -I/opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include-fixed -I/opt/android/ndk/platforms/android-9/arch-arm/usr/include /opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2/mainwindow.h -o moc_mainwindow.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.3/android_armv5/mkspecs/android-g++ -I/opt/Qt/Examples/Qt-5.3/opengl/hellogl_es2 -I/opt/Qt/5.3/android_armv5/include -I/opt/Qt/5.3/android_armv5/include/QtOpenGL -I/opt/Qt/5.3/android_armv5/include/QtWidgets -I/opt/Qt/5.3/android_armv5/include/QtGui -I/opt/Qt/5.3/android_armv5/include/QtCore -I. -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -I/opt/android-ndk-r10c/platforms/android-9/arch-arm/usr/include -I. -o moc_mainwindow.o moc_mainwindow.cpp
/opt/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/opt/android-ndk-r10c/platforms/android-9/arch-arm/ -Wl,-soname,libhellogl_es2.so -Wl,-rpath=/opt/Qt/5.3/android_armv5/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libhellogl_es2.so main.o glwidget.o mainwindow.o bubble.o qrc_texture.o moc_glwidget.o moc_mainwindow.o   -L/opt/android-ndk-r10c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -L/opt/android-ndk-r10c/platforms/android-9/arch-arm//usr/lib -L/opt/Qt/5.3/android_armv5/lib -lQt5OpenGL -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
16:57:55: Процесс «/usr/bin/make» завершился успешно.
16:57:55: Запускается: «/usr/bin/make» INSTALL_ROOT=/home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build install
install -m 755 -p "libhellogl_es2.so" "/home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/libs/armeabi/libhellogl_es2.so"
16:57:55: Процесс «/usr/bin/make» завершился успешно.
16:57:55: Запускается: «/opt/Qt/5.3/android_armv5/bin/androiddeployqt» --input /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-libhellogl_es2.so-deployment-settings.json --output /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build --deployment bundled --install --ant /usr/bin/ant --android-platform android-10 --jdk /usr/lib/jvm/java-6-openjdk-amd64 --device S5670a5ecbdc2
16:57:55: Загрузка файлов, необходимых для отладки.
16:57:55: Установка пакета: Выполнение команды «/opt/android-sdk-linux/platform-tools/adb -s S5670a5ecbdc2 pull /system/bin/app_process /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/app_process».
16:57:55: Установка пакета: Выполнение команды «/opt/android-sdk-linux/platform-tools/adb -s S5670a5ecbdc2 pull /system/lib/libc.so /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/libc.so».

BUILD FAILED
/opt/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line:
/opt/android-sdk-linux/tools/ant/build.xml:698: null returned: 1

Total time: 1 second
Generating Android Package
  Input file: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-libhellogl_es2.so-deployment-settings.json
  Output directory: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build
  Application binary: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/libhellogl_es2.so
  Android build platform: android-10
  Install to device: S5670a5ecbdc2
Buildfile: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 23.0.5
 [checkenv] Installed at /opt/android-sdk-linux

-setup:
     [echo] Project Name: QtApp
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.0.2
     [echo] Resolving Build Target for QtApp...
[gettarget] Project Target:   Android 2.3.3
[gettarget] API level:        10
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/res
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/rsObj
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/rsLibs
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/gen
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/classes
    [mkdir] Created dir: /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for QtApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [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...
     [aapt] /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/AndroidManifest.xml:3: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
     [aapt]
     [aapt] /home/dmitriy/build/hellogl_es2-Android_armeabi_GCC_4_9_Qt_5_3_2-Release/android-build/bin/AndroidManifest.xml:4: error: Error: String types not allowed (at 'configChanges' with value 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation').
     [aapt]
Building the android package failed!
  -- For more information, run this command with --verbose.
16:57:59: Процесс «/opt/Qt/5.3/android_armv5/bin/androiddeployqt» завершился с кодом 14.
Ошибка при сборке/установке проекта hellogl_es2 (комплект: Android для armeabi (GCC 4.9, Qt 5.3.2) )
When executing step "Установка на устройство Android"
16:57:59: Прошло времени: 00:21.
Помогите, пожалуйста, расшифровать, что от меня хотят.
Также интересует предложение
Цитировать
  -- For more information, run this command with --verbose.
Куда прописывается --verbose?


Название: Re: Ошибка установки проекта
Отправлено: vregess от Октябрь 26, 2014, 20:11
No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
hardwareAccelerated не поддерживается Android SDK, которую ты выбрал (судя по логу это API 10).

String types not allowed (at 'configChanges' with value 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation').

screenSize, smallestScreenSize не поддерживаются в API 10. Надо API >= 13.

В общем тебе надо поменять target SDK в манифесте и соборочную sdk в настройках запуска проекта в qtcreator.
Либо поменять конфигурацию в манифесте.

Также интересует предложение
Цитировать
  -- For more information, run this command with --verbose.
Куда прописывается --verbose?

Скорее всего это относится либо к androiddeployqt, которую запускает qtcreator, либо к ant, который запускается androiddeployqt'ом. Куда уж more information, в твоем логе достаточно написано. Что сделать, чтоб запускалось с --verbose, не знаю. Вряд ли в этом есть смысл.