qt for android doesn't find my physical device - android

I'm trying to write android applications with Qt5.1. I installed everything according to these instructions and I wrote my application and built it successfully. My problem is that when I click run on android version, instead of running the application on the device that I have connected or even asking whether I want to use the virtual device or physical device ( like eclipse does ) it just opens ADV.
I know I have connected my device properly because I can run applications I write with eclipse on my device. But not with Qt.
Can anybody help me?
Just in case you need to know I'm using the latest version of ndk and for sdk I'm using the one that comes with adt's latest version. If any other information I should provide please let me know.
thank you

I have had this problem as well, your device is not corresponding with the QT run settings. When you press run (probably in QT Creator?) it will search for devices which allow the application to run on.
There are a few possibilities when it comes to this:
Your device is not set up correctly:
run "adb start-server" and then "adb devices" in your command prompt. Does it say it found 1 device with status: "device"? If not your device probably doesn't have USB debugging enabled (you can enable this in the dev settings on your device).
You are building in the wrong mode:
Make sure you are creating a program for ARM (ARM GCC 4.7 QT 5.1 for example).
Deploying for the wrong API level:
Are you running the program on a device that supports API level 17 ? If not you can change these settings (API Level) in your QT project settings.
You don't have the recent API level installed:
Start the android sdk manager and download + install the new API's.
It worked for me after performing these steps, should you have any other difficulties feel free to ask!
Edit
If these steps did not work check if your android sdk is located in a location with write permission.

Related

Problems installing own app on Android Smartwatch

First off my devices and software:
Smartphone: Samsung Galaxy S5 (Android 4.4.2)
Smartwatch: Motorola Moto 360 First generation (Android 6.0.1)
Development software: Android Studio 3.1.3
Operating system: Windows 7 Pro 64 Bit.
I was able to install my own app on my Smartphone.
The only thing I did was generating an APK file, copying it to the sd card of my phone
and installing it.
(The phone was connected via USB.)
I had to change the minimum sdk to 19 (target sdk = 27).
Now I tried to do the same with my 2nd app (which is just for the watch).
Unfortunately, I haven't had success yet.
When I copy the app to my phone, I can't start it -> Parsing error.
The problem is that I can't set the minimum sdk to lower than 23.
After reading a lot on the Internet I tried out a completely different way.
For both devices I enabled the dev mode and turned on USB debugging + Bluetooth USB debugging.
Additionally I went to Windows 7 system settings and added the path of Android.
Right now, I'm able to type in commands like "adb devices" in cmd.exe
Sadly, I can't connect to my watch.
In on YT tutorial they say, "adb forward tcp:6666 localabstract:/adb-hub".
Whenever I try this, I receive the error message: "error: unknown host service"
Also another hint didn't work:
adb forward -remove tcp:4444
adb forward tcp:4444localabstract:/adb-hub
adb connect 127.0.0.1:4444
As you can see, both ways don't lead to success.
Do you have any suggestion how I can install my app on my watch?
I don't prefer any specific way, the main point is that it works.
Thanks for any help!
P.S. If you need further details, please let me know.
Regards
Have you tried it with another phone? Have you installed the needed dependencies for target sdks below 23? It seems you need API21 for android wear.
See example here https://www.telerik.com/blogs/build-your-first-google-wear-app

How to develop android apps with xamarin without hyper v and emulator

I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!

Android Studio doesn't show my device in the "Device Chooser" dialog. I don't want to use the emulator

I searched for the answer before asking. They weren't satisfactory.
Environment and what I did so far:
My device is Xiaomi Redmi 2. I have enabled USB Debugging in my device.
My phone uses a Cyanogen mode with 5.1.1 installed ( Lollipop ) and not 4.4 ( Kit-Kat )
It is also connected as a media device as asked in an answer
I'm running android studio on Windows 8.1.
I don't want to change my OS if that's possible.
Minimum level it is set to be API Level 15 so all the devices with ICS will be supported.
Questions:
Do I need to install a driver and if yes, what driver do I need to install to make it work?
If I need it how do I use it?
Where do I get it from?
I have to mention that I am using this site for the first time so I might not know the best way to search.
Any tips on that?
It may just be that the MTP mode isn't supported. Try changing your usb connection to PTP in your device's usb connection settings.
Taken from the Android Studio User Guide.
If you are developing on Windows and would like to connect a device to test your applications, then you need to install the appropriate USB driver.
Find the appropriate driver for your device from the OEM drivers table.
Once you've downloaded your USB driver, follow the instructions to install or upgrade the driver, and whether you're installing for the first time or upgrading an existing driver.
Update your android studio and your android project :
Android Studio > SDK Manager (top right of the ide) > Launch Standalone SDK Manager > uncheck the 'installed' checkbox > make sure you have all the recommended updates, tools and apis installed to your development machine.
Update your android project manifest file (AndroidManifest.xml) on about line 20 usually to match the target SDK version you want to build for :
You have to install ADB USB driver manually
Try the below link
http://visualgdb.com/KB/usbdebug-manual/

Unable to connect Glass to run gdk samples

I have Glass with version 4.0.4, XE 12.1
I just installed the latest ADT with Android 4.4.2 (API 19) and Glass Development Kit Preview.
My problem is when I try to run samples, DDMS shows the Glass device as being online but when I try to run the application, it gives the following error on the console:
Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
When the Android Device Chooser window opens, there is no entry for Glass in the list.
Glass has debug mode turned on and is visible in DDMS but just not compatible for some reason.
This also brings me to a related question. I just received my device in the mail yesterday and left it charging overnight but still has not updated to XE 16. Glass is connected to wifi and the internet is fine on it. What do I need to do to force it to update itself?
Thanks for your help.
You might try the following:
First, make sure that your Google Glass is updated to XE16 (connect to your home/business wifi; plugin charging cable). Do not attempt to go further until your Google Glass has updated
Once that is done, you might look at some of the other answers to "how do I connect". Some of the steps for this are shown below.
What OS are you using (Windows?). Let me know and I will update the answer with what I had to do to see Google Glass (or look here )
I guess you set the wrong project target.
If you are using Eclipse, open project.properties and make sure the target looks like this:
# Project target.
target=Google Inc.:Glass Development Kit Sneak Peek:15
Not
# Project target.
target=android-15
You can try:
Open project properties (Alt+Enter) -> Android -> Project Build Target -> Glass Development Kit Sneak Peek
BTW, IMO, Glass update is pretty random. I have no idea how Google decides who gets the update. You can flash the system image if you don't want to wait. Please see https://developers.google.com/glass/tools-downloads/system. (Warning: Rooting, unlocking, or flashing your Glass voids your warranty.)
The fact that Glass is displayed under DDMS shows, it is being detected by ADB. The reason you are not able to run the app on Glass is that, your current version of GDK is not compatible with Glass XE 12.1. If you run projects with Android 4.0, you can see your device listed.
In order to resolve this issue, upgrade Glass XE to the latest and try running the app. Then your device will be listed under currently running devices.
Glass XE will be automatically upgraded. Make sure your device is connected to WIFI, connect device to the charger and restart.

How to stop Android Application under Eclipse in Mac OS X?

I have run android application on my Device. I want to stop this running application using DDMS.
On windows, I can see threads which are running on Android Device. like following image
But on Mac OS X, I am missing such option, How can I get these ?
I see that it's not the same device (4.1.2 vs 4.3) . Did you enable your device as debuggable?
It's in the developer's options and then check USB Debug option.
EDIT: See here how the security of USB debugging was improved since Android 4.2.2
I think when you will select a device then after only it will enable that option. From your screenshots it is clearly seen that you have selected a device in Windows Platform while in Mac you haven't select it.

Categories

Resources