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
Related
I am very new to Android development. I am trying to create and run an app from tutorial - https://developer.android.com/training/basics/firstapp/creating-project.html
But while running app it is showing me "No USB devices or running emulator detected" in Select deployment target dialog.
Background and what I tried:
I am using Lenovo K4 note Vibe.
Android version 5.1
I have enabled USB Debugging from my phone also checked "Enable OEM unlock"
I have selected USB "MTP" as connection mode when I connected my phone to machine.
I am using windows 7 and Android studio version 2.3.2
My device appears in "Device Manager" of my system i.e. It is installed properly.
When I connect my phone to my system it shows AutoPlay dialog, asking to run "Run Lenovo_suite.exe", I tried to see if my deice appears in Studio when I allow to run that app, but still no luck
I also tried by checking and unchecking "Enable ADB Integration" from Android studio, still no luck
I have already installed Android SDK for verion 5.1
I have also tried installing "Google USB driver".
I also tried connecting my device to all of my machine port
I am tried using Emulator, but it is really very slow on my machine, it takes around 2-3 hours just to boot. So, I am using my phone.
Your assistance in this matter is greatly appreciated
this problem just happen when your USB connection mode is not work in debug mode, Like:
File Transfer Or MIDI device
The Charging Only is Work in android 5 and above
GoodLuck
a addition to above answer i think if you try to debug it , you will get better result since android if had problem throw a error that says restart adb.exe ,
another thing whats your hardware config ?
and have you tried genymotion , i prefer it over android virtual device , working with a real device is better , but i prefer when to concentrate on monitor have device on it ;)
As per My experience many device not connect
So you need to try this Windows Software to detected your android phone
Install it on your windows system PDANET+
Thanks for your support guys. After 2 hours of struggle I found below:
When I connect my device to the machine, it shows me a AutoRun dialog to Run Lenovo_suite.exe(Which I mentioned in my question), but instead of auto running, I explored that newly created lenovo drive, which had 2-3 setup exe's(usb drivers and magicPlus), I installed both and restarted my machine. When I run MagicPlus software, it helped me to Authorize USB debugging with some kind of fingerprints. And now my device appeared in studio.
I am using the latest version of Android Studio(2.1.2) at the time of writing this post . The problem that I am experiencing is that the ADB instance used by Android Studio doesn't seem to be able to find my Galaxy Core Prime device (SM-G361F, stock Android version - 5.1.1). It can connect to an emulator just fine.
What I had tried (most of these multiple times):
enabling/disabling developer options
enabling/disabling USB debugging
revoking USB debugging authorization
changing MTP to PTP and vice versa (my device doesn't allow deselecting both options, one must be chosen)
reinstalling the drivers
powering on and off both the phone and the PC
installing Samsung's Smart Switch software
using different USB ports
trying out different Android Studio versions (x86 and x64 with the latest respective JDKs)
This is what it looks like in Android Studio:
I had installed the official Samsung's USB drivers from here.
This is what the Device Manager is showing (Windows 7 64-bit SP1):
Afterwards, I've also tried installing the Universal USB drivers from here.
This is what firing up its installation of ADB looks like:
It has obviously successfully found the device.
My device also politely prompted me to allow the PC to connect to it using a generated RSA key which never happened with Android Studio.
The only thing I've not tried is installing Samsung's Kies software.
I really don't know what is the problem here.
Maybe I should just give up and instead use the emulator but it is a damn shame not to be able to debug on an actual physical device, if you ask me.
Thank you in advance.
Android in general does not support all phones for a debug connection. I have a samsung s6 and for me that works. I don't know about the Core Prime though. However, in most cases(in my experience):
The phone does not support the connection
You did not install all the required files in terms of the android SDK you might have not gotten the latest update that supports more phones
The OS is not supported - Mainly caused because Samsung and a lot of other brands insist on having their own updates. And some times they - on purpose or by accident - forget to support USB debugging for developers.
My tablet did not support the USB debugging connection untill it reached android 6.
The cable is a charge-only cable (yes, those exist for some reason). Try with a different cable
You don't have the necessary drivers. Make sure they're installed
It might be circumstantial that your phone model does not support the connection for some reason, but it is really hard to tell. The only way to get proper help is to contact Samsung customer support, but in my experience it is just a waste of time. They don't know their own products. If you try with another device it might work.
After some continued tinkering I managed to get Android Studio to recognize my device. All I did was adding the path to the ClockworkMod's ADB .exe to the PATH environment variable. That seems to have done the trick as Android Studio now allows me to run the application on my device even though it is still running its own instance of ADB (located in the platform-tools folder).
It might be completely unrelated but I'm not considering undoing the modification made to the environment variable.
Here is the proof:
Eclipse isn't recognizing neither of my two Android phones.
I've tried updating all of the Android SDKs in eclipse as well as eclipse itself.
Both of my phones are being recognized by my Macbook and Android File Transfer works like a charm.
They are both in Developer mode with Debug turned on.
I've also tried connecting them in both MTP and PTP but eclipse still won't recognize my phones.
I get the RSA fingerprint pop-up and I press OK but nothing happens.
What could be the problem? I don't know what else to do.
Edit: Eclipse used to work the last time I used it to run Android apps (which was about three-four months ago). Now, it won't recognize my phones. Also, you can't install drivers on the Mac. According to Google, it is just supposed to work.
Edit: This is what I get for the adb devices.
Marcos-MBP:platform-tools Poloe$ ./adb devices
List of devices attached
Found out the problem.
Turned out it was this.
adb devices list empty -- Snow Leopard
My phones weren't being recognized because I had EasyTether installed on my phones and on my Macbook.
According to the EasyTether website:
ADB on Mac OS X stops recognizing the attached device after installing EasyTether driver
Do not follow this advice if you are not a software developer who uses the Android SDK on Mac. Otherwise run "sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext" to unload the EasyTether driver manually. Load it again with kextload when necessary.
I am trying to work with Android development, but I cannot get any android device to work with Eclipse. I try manually checking the devices in the command line by calling ADB devices, and it shows no connected devices.
I have tried with both a Galaxy Note and an Android phone and neither are recognized. I have all the device drivers installed and USB debugging turned on for each of the devices.
Is it possible that I do not have something configured correctly with my initial install of eclipse or the android tools, or perhaps need to download more software from the SDK?
I have read through many other questions but they are specific to a type of device not working, my issue is that no devices are being recognized.
Thanks.
Are you sure that your device drivers are correctly installed?
Your device must be visible in device manager in Portable Devices category or something like that.
You can download drivers for Samsung devices here : http://www.samsung.com/ca/support/usefulsoftware/KIES/JSP
I solved the issue. The phone worked after doing a manual update for the abd so going to the command line where it was located and doing abd update.
The tablet was a different issue, apparently it needed samsung kies to be installed to communicate with the device.
So everything is working now.
I want to run my Android Project iwrote with emulators on my Android Device. The Device is Connected on an USB-Port. When I start the "Android Device Chooser" nothing happens. No running device in the "Choose a running Android Device"-Table is displayed.
I tried to reboot the system(PC and Smartphone) while connecting. I tried every USB mode. I tried another Device( G1 and HTC Desire). Unknown Source is always true.
I tried another Eclipse-Version(64 and 32 bit), tried another SDK(64 and 32 bit) and reinstalled the android sdk.
I still can't see any device. Everything worked fine on my old 32 bit system. Now i have to work with my 64 bit lenovo. (both windows 7)
somebody got another idea?
Thank you.
Fabian
See this link for detailed info: http://developer.android.com/guide/developing/device.html#setting-up
In short, you have to:
Mark your app as debuggable (in Manifest)
Allow USB debug on your device (Settings->Application)
And, if developing in Windows, download drivers.
Try command line "adb devices" to see if your phone is detected ok. Except limited number of phones supported by Android by default, manufacturer-supplied setup needs to be used to start usb mode. In my case, Vodafone 845, setup was contained in phone storage. So after phone was detected as normal usb storage, I located that utility and simply ran it. Then it started to be detected as android phone.
The easiest way to this dilema i found here. If you are on windows,
Make sure you have install the google usb driver
Ensure USB Debugging is enabled.
download the adbdriver setup from http://adbdriver.com/downloads/
just follow the wizard and install, automatically it should see your device or you try restarting android studio.
Enable USB Debugging :
Setting - About Phone - Tap Build Number 5 times.
Then go to : Setting - Developer Options - Turn On Usb Debugging.
Download and install Wondershare Mobile Go / Snappea. That program will download and install your android device.
If this popup appears, click allow.