位置: IT常识 - 正文
推荐整理分享Android平台Qt开发入门教程 狼人:(qt5开发android),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:安卓qt开发,android qt开发,qt开发安卓应用程序,qt开发安卓app用什么语言,qt开发安卓应用程序,安卓qt开发,qt开发安卓应用程序,qt开发安卓效率怎么样,内容如对您有帮助,希望把文章链接给更多的朋友!
aries@uu3g:/wp/qt-creator-android-qt-creator$ lsdistHACKING LICENSE.LGPL qtcreator.proscriptssrcdoc LGPL_EXCEPTION.TXTqtcreator.priREADME share testsexport ANDROID_NDK_ROOT=/opt/android-ndk-r5export ANDROID_NDK_HOST=linux-x86export ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabiexport ANDROID_NDK_TOOLCHAIN_VERSION=4.4.3export ANDROID_NDK_PLATFORM=android-8./androidconfigbuild.shsudo mkdir /data/local/qtsudo make installaries@uu3g:~$ emulator -avd android2.2 -partition-size 256#!/bin/sh
adb shell rm -r /data/local/qt || exit 0rm -fr almkdir alcp -a lib/*.so* al/
/opt/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded al/*
adb push al /data/local/qt/libadb push imports /data/local/qt/importsadb push plugins /data/local/qt/plugins......#修改以下2行,指向你的android-sdk和android-lighthouse源码路径SDK_ROOT=/home/buus/dev/android-sdk-linux_x86LIGHTHOUSE_ROOT=/home/buus/dev/android-lighthouse......#我的android-sdk里面,adb在platform-tools目录下面,所以修改为$SDK_ROOT/platform-tools/adb\$SDK_ROOT/tools/adb install -r bin/\$PROJECT_NAME-debug.apk......#同上\$SDK_ROOT/tools/adb shell am start -n org.\$PROJECT_NAME.qt/.QtMain......#同上\$SDK_ROOT/tools/adb install -r bin/\$PROJECT_NAME-debug.apkcp $LIGHTHOUSE_ROOT/examples/android/QtAnimatedtiles/AndroidManifest.xml $J_PRO/AndroidManifest.xmlcp -r $LIGHTHOUSE_ROOT/src/android/java/src/com $PROJECT_NAME-java/srcsed -i "s/animatedtiles/$PROJECT_NAME/g" $J_PRO/AndroidManifest.xmlcp \$Q_PRO/lib\$PROJECT_NAME.so* \$J_PRO/libs/armeabi #我们编译cpp代码时是生成可执行文件,不是生成动态库cp $LIGHTHOUSE_ROOT/src/android/java/AndroidManifest.xml $J_PRO/AndroidManifest.xmlcp -r $LIGHTHOUSE_ROOT/src/android/java/src/* $PROJECT_NAME-java/srccp -r $LIGHTHOUSE_ROOT/src/android/java/res/* $PROJECT_NAME-java/ressed -i "s/animatedtiles/$PROJECT_NAME/g" $J_PRO/src/org/$PROJECT_NAME/qt/QtMain.javased -i "s/calculator/$PROJECT_NAME/g" $J_PRO/src/com/nokia/qt/android/QtActivity.javased -i "s/example.name/$PROJECT_NAME.qt/g" $J_PRO/AndroidManifest.xmlsed -i "s/Application name/$PROJECT_NAME/g" $J_PRO/res/values/strings.xmlcp \$Q_PRO/\$PROJECT_NAME \$J_PRO/libs/armeabi/lib\$PROJECT_NAME.so #我们编译cpp代码时是生成可执行文件,不是生成动态库,但这里必须以动态库的形式加载./create_android_lighthouse_project.sh -n calculator
./build.sh
aries@uu3g:/wp/android-lighthouse$ rm calculator-cpp/* -rfaries@uu3g:/wp/android-lighthouse$ cp calculator/* calculator-cpp/aries@uu3g:/wp/android-lighthouse$ ./build.sh/opt/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fpic -mthumb -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DQT_NO_QWS_TRANSFORMED -I/wp/android-lighthouse/src/3rdparty/android/precompiled/android-8/arch-arm/include -Os -g -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wall -W -D_REENTRANT -DQT_NO_CORESERVICES -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../mkspecs/android-g++ -I. -I../include/QtCore -I../include/QtNetwork -I../include/QtGui -I../include -I.moc/release-shared -I/opt/android-ndk-r5/platforms/android-8/arch-arm/usr/include -I/opt/android-ndk-r5/sources/cxx-stl/gnu-libstdc++/include -I/opt/android-ndk-r5/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -o .obj/release-shared/button.o button.cpp.......-obfuscate:
-dex: [echo] Converting compiled files and external libraries into /wp/android-lighthouse/calculator-java/bin/classes.dex...
-package-resources: [echo] Packaging resources [aapt] Creating full resource package...
-package-debug-sign:[apkbuilder] Creating calculator-debug-unaligned.apk and signing it with a debug key...
debug: [echo] Running zip align on final apk... [echo] Debug Package: /wp/android-lighthouse/calculator-java/bin/calculator-debug.apk
BUILD SUCCESSFULTotal time: 8 seconds652 KB/s (304878 bytes in 0.456s) pkg: /data/local/tmp/calculator-debug.apkSuccess
adb logcat
下一篇:WordPress 浏览量作弊代码,随机增加浏览量(WordPress 浏览量修改)
友情链接: 武汉网站建设