Qt 5.2 and Android Error - android

So after a few hours of struggling to set up my Qt so I can start with my first Android app I am still without luck.
I’ve gotten a VERY simple program (just to get all the settings right) to build properly but when I click the play button to run it, there is an error I cannot seem to solve. Here is the complete output when I press play:
22:16:45: Running steps for project Androidtest...
22:16:45: Configuration unchanged, skipping qmake step.
22:16:45: Starting: "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe"
mingw32-make: Nothing to be done for 'first'.
22:16:48: The process "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
22:16:48: Starting: "mingw32-make" INSTALL_ROOT="D:\\RundownRiot\\Androidtest\\build- Androidtest-Android_for_arm_GCC_4_6_Qt_5_2_0-Debug\\android-build" install
qtcreator_ctrlc_stub: Command line failed: mingw32-make INSTALL_ROOT="D:\\RundownRiot\\Androidtest\\build-Androidtest-Android_for_arm_GCC_4_6_Qt_5_2_0-Debug\\android-build" install
22:16:48: The process "mingw32-make" exited with code -1.
Error while building/deploying project Androidtest (kit: Android for arm (GCC 4.6, Qt 5.2.0))
When executing step 'Copy application data'
22:16:48: Elapsed time: 00:03.
The error is in line 6.
I read that sh.exe might be in the path variable but I don’t think its there, here is the value for path:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\CineForm\Tools;C:\Program Files\QuickTime\QTSystem\;
C:\Program Files\Windows Live\Shared; C:\Program Files\Java\jdk1.7.0_51\bin;
C:\Android\AndroidSDK\sdk\tools;
C:\Android\AndroidSDK\sdk\platform-tools;C:\Program Files\Java\jdk1.7.0_51\bin;
C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin;
I am using win7 32bit, Qt5.2 and Qt Creator 3.0.1.

I found that I had more than 1 version of Qt installed. So I uninstalled Qt completely and only installed the latest version. That solved all my problems.

Related

Android Emulator not running for Cordova App - adb -s emulator-5584 shell cat /proc/cpuinfo

I'm trying to make my environment work with Cordova and Android emulator with no success. I have installed the Android Studio and I can successfully start the Android Emulator.
I have created a cordova application with the command below:
cordova create myApp
I added support for the Android platform:
cordova plataform add android
I had the following output:
Using cordova-fetch for cordova-android#~6.2.2
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android#6.2.3
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
--save flag or autosave detected
Saving android#~6.2.3 into config.xml file ...
Then I try to run the application:
cordova run android
The emulator starts, after a while, that I have the error below in the command prompt:
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5X_API_24
Waiting for emulator to start...
Error: Failed to execute shell command "getprop,dev.bootcomplete"" on device:
Error: C:\Users\username\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 3221226356
Does anyone knows how to fix this error?
Some others environment info:
C:\>node -v
v7.4.0
C:\>cordova -v
7.0.1
C:\>java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Edit 1
I have done those steps:
Uninstalled "Android SDK Tools"
Uninstalled "Android Studio"
Deleted files from "C:\Users\USER\AppData\Local\Android\sdk" and "C:\Program Files\Android\Android Studio" files (Because some maybe in use during the uninstallation)
Installed Android Studio
Updated Android Studio
When I execute the command below, I have more information about the error:
cordova run android --verbose
With this output:
Command finished with error code 3221226356:
C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe
-s,emulator-5584,shell,cat,/proc/cpuinfo Error: Failed to execute shell command "cat,/proc/cpuinfo"" on device: Error:
C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe:Command
failed with exit code 3221226356
When I execute the command below, the adb shows the emulator cpu info, after that, the process stops and the windows ask to break or debug
adb -s emulator-5584 shell cat /proc/cpuinfo
Downgrade your SDK platform-tools to rev25.0.1.
If you dev in windows, you can download it in https://dl-ssl.google.com/android/repository/platform-tools_r25.0.1-windows.zip
delete or rename your old platform-tools folder, and extract the downloaded file to it.
Works for me!
I encountered the same issue with an emulator of Nexus5 & Oreo/Nougat.
I changed my emulator to Galaxy Nexus & Lollipop and it worked fine without any modification in the Cordova directories.
It does not seem to be the right solution, but some lower combinations might be available for avoiding this issue.
The command line is:
$ cordova emulate android
The following is the success log:
No emulator specified, defaulting to Galaxy_Nexus_API_22
Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
emulator: WARNING: encryption is off
path /home/ximia/.android/avd/Galaxy_Nexus_API_22.avd/system.img.qcow2
Waiting for emulator to boot (this may take a while)...BOOT COMPLETE
Edit your virtual device (ADV) and go into advanced settings and uncheck Multi-Core CPU.
Work fine to me.

Unable to compile on QT for Android

I am new to QT programming and am trying to build a simple program on Android. I have installed QT 5.8, latest Android SDK, NDK and apache ant, but it gives the same error. I searched about this issue and tried using older versions of QT(5.5.1 and 5.7.0) , Android SDK as well as NDK, but its not helping. I tried giving the build path a shorter name, removed all the folders which had spaces in the title and reinstalled everything. Please help.
Error 1
11:40:56: The process "C:\Qt\Qt5.7.0\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
11:40:56: Starting: "C:\Qt\Qt5.7.0\5.7\android_armv7\bin\androiddeployqt.exe" --input C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-libcalqlatr.so-deployment-settings.json --output C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build --deployment bundled --android-platform android-25 --jdk "C:/Program Files/Java/jdk1.8.0_131" --ant E:/Android/apache-ant-1.9.6/bin/ant.bat
Generating Android Package
Input file: C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-libcalqlatr.so-deployment-settings.json
Output directory: C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build/
Application binary: C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/libcalqlatr.so
Android build platform: android-25
Install to device: No
Application binary is not in output directory: C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build//libs/armeabi-v7a/libcalqlatr.so. Please run 'mingw32-make install INSTALL_ROOT=C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build/' first.
11:41:09: The process "C:\Qt\Qt5.7.0\5.7\android_armv7\bin\androiddeployqt.exe" exited with code 7.
Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
When executing step "Build Android APK"
11:41:09: Elapsed time: 01:15.
Check for build.xml in your output path
C:/Qt/Qt5.7.0/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build/
and also check
TEMPLATE = app
in your pro file if this is not there append this.

Can't get QtCreator to deploy to android emulator

I'm running following setup:
Ubuntu 13.10 64bit
Qt creator 3.0.1
Qt 5.2.1
NDK r9d 64bit
adt-bundle-linux-x86_64-20140321.zip
I managed get it compile. I started emulator before deploying the app. but instead of sending the apk to running emulator it started a new one... Qt Create went not responding for a while...new emulator got booted up and after a while Qt createor started to respond again and returned following compile output.
Also I tried to get it working on Windows 7 64bit before Ubuntu but the result was very same. Also I believe the software versions were mostly same.
17:11:12: Removing directory /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build
17:11:12: Starting: "/usr/bin/make" INSTALL_ROOT=/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build install
cp -f -R /home/rikko/android/projects/omgFrickingGosh/qml/omgFrickingGosh /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/assets/qml/
install -m 755 -p "libomgFrickingGosh.so" "/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libomgFrickingGosh.so"
17:11:13: The process "/usr/bin/make" exited normally.
Error while building/deploying project omgFrickingGosh (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
When executing step 'Deploy to Android device'
17:13:26: Elapsed time: 02:14.</code>
I actually maanged to get it runningun Windows.
Seems that most probablt the suspects are new SDK or NDK.
So the configuration that is currently working on 64bit Win 7 is followng:
JDK: jdk-7u51-windows-x64.exe
Ant: apache-ant-1.9.2-bin.zip
NDK: android-ndk-r9-windows-x86_64.zip
SDK: adt-bundle-windows-x86-20131030.zip (contains SDK manager 22.3)
Qt 5.2.1 and QtCreator 3.0.1 both from qt-opensource-windows-x86-1.5.0-2-online.exe
Contact me if you have similar problem and can't get your hands on these package versions yourself.

Deploying android app to phone : error: [install_itemfolder_01] Error 1 Windows

I’ve installed all components that I could possibly need,
I’ve been on the net for two days and I just can’t find an answer to this question.
I’ve checked my apache ant,
javac,
java JRE, JDK,
Qt Variables and everything is ok.
Qt likes all of my settings apart from when I try to deploy my app to emulator or device I get this error
Issues Output:
:-1: error: [install_itemfolder_01] Error 1
Compile Output :
17:54:43: Running steps for project Test...
17:54:43: Configuration unchanged, skipping qmake step.
17:54:43: Starting: "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe"
mingw32-make: Nothing to be done for 'first'.
17:54:45: The process "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
17:54:45: Starting: "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" INSTALL_ROOT="C:\\Users\\ryan\\Desktop\\Projects\\Qt c++\\build-Test-Android_for_armeabi_GCC_4_8_Qt_5_2_1-Release\\android-build" install
The system cannot find the path specified.
The system cannot find the path specified.
makefile:1716: recipe for target 'install_itemfolder_01' failed
mingw32-make: *** [install_itemfolder_01] Error 1
17:54:45: The process "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Test (kit: Android for armeabi (GCC 4.8, Qt 5.2.1))
When executing step 'Copy application data'
Is there anyone who can help?
Thanks
I Fixed it.
For the love of life don't put any " " (Spaces) in your application path

Android Emulator is running but not loading my app in Titanium

I can run the app in the "mobile app preview in browser", and I can boot up the Android Emulator successfully. But the emulator just showed me the home screen all the time without loading my app. I've looked through all the similar questions online but couldn't find a solution.
Here is the console...hope someone can help me out. Thanks!
*Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA
Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.
[INFO] : Running emulator process: python "C:\Users\Ni\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "emulator" "myFirstApp" "C:\Users\Ni\Android-sdk\adt-bundle-windows-x86\sdk" "C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp" "com.yn.myFirstApp" "4" "HVGA" "armeabi"
[INFO] : Running build process: python "C:\Users\Ni\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "simulator" "myFirstApp" "C:\Users\Ni\Android-sdk\adt-bundle-windows-x86\sdk" "C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp" "com.yn.myFirstApp" "4" "HVGA"
[INFO] logfile = C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp\build.log
[INFO] Building myFirstApp for Android ... one moment
[INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef)
[INFO] : Emulator process exited successfully
[INFO] : Project built successfully in 3s 24ms
[INFO] : Emulator not running, exiting...*
Don't know if you have solved this, but for the reference of others, you shouldn't run the emulator yourself, allow Titanium Studio to launch the emulator by simply running your application with the emulator option (like Martin says)
In my own experience, i'm able to run my app in the emulator, but for all subsequent runs, i need to close the emulator and run the app again since Studio fails to detect the emulator and gives me an error similar to yours.
I forgot to add an answer for this question...
I could successfully run the Titanium only when I choose "run as administrator".
When this happens, you can install the app manually.
You will find your app's executable in the following directory under your app directory: build/android/bin/YOURAPPNAME.apk. On the Mac, you need to open a terminal window, cd to that directory, and type "chmod 777 YOURAPPNAME.apk". Then cd to the platform-tools directory under your android sdk installation directory, and run the following commands:
./adb kill-server
./adb start-server
./adb install <full path name to YOURAPPNAME.apk>
You will see your app appear on the home screen of the emulator.
I made a shell script to do this.

Categories

Resources