./create_android_lighthouse_project.sh -n calculator
./build.sh
我执行以上几个步凑后的终端:
aries@uu3g:/wp/android-lighthouse$ rm calculator-cpp/* -rf
aries@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 SUCCESSFUL
Total time: 8 seconds
652 KB/s (304878 bytes in 0.456s)
pkg: /data/local/tmp/calculator-debug.apk
Success
adb logcat
用鼠标点击下这个计算器试试效果如何。
以后我们便可以按照以上步凑创建自己的Qt应用程序了。