Unable to open APK file in Android phone.
-
This is the compiler output when I build my project.
08:31:49: Running steps for project mqtt...
08:31:49: Configuration unchanged, skipping qmake step.
08:31:49: Starting: "/usr/bin/make"
Makefile:2277: warning: overriding recipe for target 'install_itemfolder_01'
Makefile:2268: warning: ignoring old recipe for target 'install_itemfolder_01'
Makefile:2281: warning: overriding recipe for target 'uninstall_itemfolder_01'
Makefile:2272: warning: ignoring old recipe for target 'uninstall_itemfolder_01'
make: Nothing to be done for 'first'.
08:31:49: The process "/usr/bin/make" exited normally.
08:31:49: Removing directory /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build
08:31:49: Starting: "/usr/bin/make" 'INSTALL_ROOT='''/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build'''' install
Makefile:2277: warning: overriding recipe for target 'install_itemfolder_01'
Makefile:2268: warning: ignoring old recipe for target 'install_itemfolder_01'
Makefile:2281: warning: overriding recipe for target 'uninstall_itemfolder_01'
Makefile:2272: warning: ignoring old recipe for target 'uninstall_itemfolder_01'
cp -f -R /home/sush/Desktop/qt\ hw5/qt\ file/qt\ file/qml-qmqtt-master/qml/mqtt '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build'/assets/qml/
install -m 755 -p libmqtt.so '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build'/libs/armeabi-v7a/libmqtt.so
08:31:49: The process "/usr/bin/make" exited normally.
08:31:49: Starting: "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" --input '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-libmqtt.so-deployment-settings.json' --output '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build' --deployment bundled --android-platform android-23 --jdk /usr/lib/jvm/java-8-openjdk-amd64 --ant /usr/bin/ant
Warning: QML import could not be resolved in any of the import paths: mqtt
Warning: QML import could not be resolved in any of the import paths: Qt.labs.controls.material.impl
Warning: QML import could not be resolved in any of the import paths: Qt.labs.controls.universal.impl
Warning: QML import could not be resolved in any of the import paths: Qt.labs.controls.impl
Generating Android Package
Input file: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-libmqtt.so-deployment-settings.json
Output directory: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/
Application binary: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/libmqtt.so
Android build platform: android-23
Install to device: No
Buildfile: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/build.xml-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 25.1.6
[checkenv] Installed at /opt/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: 23.0.3
[echo] Resolving Build Target for QtApp...
[gettarget] Project Target: Android 6.0
[gettarget] API level: 23
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/res
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/rsObj
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/rsLibs
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/gen
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/classes
[mkdir] Created dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/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 6 source files to /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] Note: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/src/org/qtproject/qt5/android/bindings/QtActivity.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 3 warnings-post-compile:
-obfuscate:
-dex:
[dex] input: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/classes
[dex] input: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroid-bundled.jar
[dex] input: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroidBearer-bundled.jar
[dex] input: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroidAccessibility-bundled.jar
[dex] Pre-Dexing /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroid-bundled.jar -> QtAndroid-bundled-e74f6974b48384bec0204c194404cf34.jar
[dex] Pre-Dexing /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroidBearer-bundled.jar -> QtAndroidBearer-bundled-0d33055fa8d75193a2f5ff53ec836ee5.jar
[dex] Pre-Dexing /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/libs/QtAndroidAccessibility-bundled.jar -> QtAndroidAccessibility-bundled-0c84fb77e41d923ce2eb506aa6f68e6d.jar
[dex] Converting compiled files and external libraries into /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/classes.dex...
[dx] Merged dex #1 (23 defs/42.3KiB)
[dx] Merged dex #2 (60 defs/120.8KiB)
[dx] Merged dex #3 (5 defs/10.4KiB)
[dx] Merged dex #4 (3 defs/2.4KiB)
[dx] Result is 91 defs/204.9KiB. Took 0.2s-crunch:
[crunch] Crunching PNG Files in source dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/res
[crunch] To destination dir: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/res
[crunch] Crunched 0 PNG files to update cache-package-resources:
[aapt] Creating full resource package...-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating QtApp-debug-unaligned.apk and signing it with a debug key...-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/QtApp-debug.apk
[propertyfile] Creating new property file: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/build.prop
[propertyfile] Updating property file: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/build.prop
[propertyfile] Updating property file: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/build.prop
[propertyfile] Updating property file: /home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build/bin/build.prop-post-build:
debug:
BUILD SUCCESSFUL
Total time: 10 seconds
Android package built successfully in 11.435 ms.
-- File: '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build//bin/QtApp-debug.apk'
08:32:00: The process "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" exited normally.
Error while building/deploying project mqtt (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Deploy to Android device"
08:34:01: Elapsed time: 02:12.I see there's an error at the end but idk why does this happen, the project runs smoothly in Desktop kit but when i transfer APK to my phone it force closes.
Any help is appreciated. -
@sushant1727 said:
-- File: '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build//bin/QtApp-debug.apk'
08:32:00: The process "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" exited normally.
Error while building/deploying project mqtt (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Deploy to Android device"
08:34:01: Elapsed time: 02:12.After changing some settings in Android Device I don't get the error anymore i. e
-- File: '/home/sush/Desktop/qt hw5/qt file/qt file/build-mqtt-Android_for_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/android-build//bin/QtApp-debug.apk'
08:32:00: The process "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" exited normally.
Error while building/deploying project mqtt (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Deploy to Android device"
08:34:01: Elapsed time: 02:12.But still the app terminates when running in phone.
-
HI, i'm interested in your code can you share it with me please?