Android Beginner: Trying to run my Android app on my Nexus 5 - android

I'm a beginner in Android development, and I'm trying to figure out Eclipse and the development environment and how everything is set up. I found a guide on developer.android.com, but it really isn't helping to get my test app running on my devoce. I've connected my Nexus 5 to my PC, I've enabled USB Debugging and all that. I have a simple app created... but when I try to run it, it only wants to run on the Virtual Device. The guide I'm following just says "Enable USB Debugging," but that doesn't seem to do the trick. What am I missing? How do I run my app on my device?

You need to install the Google USB Driver, which comes in the Android SDK platform see more here: http://java.dzone.com/articles/how-enable-usb-debugging-nexus

Related

Android Studio: Running application in emulator not working

Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.

No USB devices or running emulator detected

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.

Google Glass unknown for Eclipse(Android Device Chooser)

I know there are a few threads regarding the the connectivity between Google Glasses and Eclipse on Windows 7> but I think mine it's a bit different unfortunately.
I followed this threads:
Eclipse & adb Not Recognizing Glass as Running Android Device
Unable to connect to Google Glass on Windows 7 (using ADT)
but unfortunately non helped me 100%.
The PROBLEM:
Even though I followed the steps from the threads, when I go to eclipse and try to run the sample Compass application it shows in the Android Device Chooser(Run configurations) in the target section as unknown.
I must mention that:
enabled debugging on the glasses (several times)
In the Device Manager(Windows 7) it appears as Android Composite ADV Interface, under SAMSUNG Android Phone(?? on the threads they say that should be Android Devices; anyways it appears as ADV Interface)
Reboot system
SDK: GoogleUSB Driver(version 10)
What am I missing here? Thanks a lot for every tip! ;)
Have you tried ./adb devices ? what do you see when you do that?
Did you confirm that your computer is a trusted device on Glass?

Genymotion Android Emulator Plugin for Mosync IDE

i've been trying to develop an Android application for some time now but the problem i keep facing is finding a suitable emulator to run a demo of the application (I think the default Android SDK emulator is crap). Anyway i did some research and came across the genymotion android emulator which is faster than any other emulators i have tired so far. I then went on to search for a plugin for my Mosync IDE which is an IDE built on eclipse that allows you to develop native, web or hybrid apps using htnl5, css, javscript, c/c++. Anyway i installed the plugin with the MosyncIDE the same way you install any new software in any eclipse based IDE and it installed fine. The problem i have now is that i am able to run the emulator okay but when i try to run my application inside that emulator i am unable to locate the genymotion virtual device in the list. I have been fiddling with my configuratin settings for days now without any results, i do not own an android phone so testing it directly on one is not an option for me, i would like someone to help me out with this problem thank you.
Please note that i am able to run the app normally with the default androidsdk emulator.
[What i have been trying soo far]
This is what i do currently, i start the genymotion emulator within the IDE.
I go to run configurations.
I choose Android Emulator.
I hit "Refresh AVD list"
Then i choose the android emulator i want from the list, the problem is i can't find the
genymotion emulator i started within that list.
Ok. The thing is that Genymotion device is not considered as an emulator but like a real device plugged on USB. You won't find it on the AVDs list but on the "running Android devices".
You first have to check if the running Genymotion VM is connected TO ADB: Run adb devices on a console. It should show you something like this:
List of devices attached
192.168.56.101:5555 device
The Genymotion device is shown as it's IP address.
If the Genymotion device is shown on this list, it should also appear on the list of available devices when you hit the "run" button of your IDE. Like in this picture (done with Eclipse IDE).
If it is not shown on the list, read my previous answer.
So you installed the Genymotion Eclipse plugin isn't it?
And it seems that adb devices does sometimes not display your Genymotion device.
When the VM boots into the Genymotion player, it executes:
adb connect <VM's IP address>
This connects the device to adb, so you are able to debug your apps with it.
Sometimes, it appears that the connection is lost and you have to run adb connect <VM's IP address> again. You have to do it manually for now.
You can get the IP of your running device using the Genymotion Shell with the command devices list

Running android development app on real device?

I usually develop in .NET using Visual Studio. I'm just trying to build my first (Hello Work) android App. So I'm new to Eclipse and new to Android.
I followed everything on this link up to
http://developer.android.com/sdk/installing/installing-adt.html
Up to "Run on a real device".
I've got a Galaxy S4 connected to the USB and Developer options > USB Debugging activated.
But Eclipse doesn't seem to see the Android USB Device.
(I know I still have the option to create a virtual device, but I'd like this to work too.)
Thank you for your help.

Categories

Resources