Android Studio (Windows 7) is giving me the "Unable to create debug bridge" error, as this person describes:
Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'
I have tried pretty much every solution I've found and then realized that I just recently installed Xamarin for Visual Studio 2015 as well, and I'm thinking that has screwed up Android Studio. adb works fine from the command line. A Google search didn't turn up any relevant results for this issue but I'm hoping someone can at least confirm that these IDEs don't play nicely together, and ideally even present a solution. I can do my installation from the command line but of course that's a pain compared to just clicking a button in the IDE, not to mention the inconvenience of using the command line to view logcat.
When you installed Xamarin, did you see if another SDK was installed in a different location in your computer? Because this happened to me. I had Android Studio installed then I installed VS 2015 with Xamarin but I didn't realize that the option to install android SDK (with adb and etc) was enabled. After realizing that, I changed Xamarin configs to point to my older SDK folder (the one used by Android Studio as well), then everything worked.
Related
So recently I installed Android Studio for work at college, but can't make the emulator work and I don't know how?. I installed everything it needs HAXM and etc and the process is always getting killed, tried to look at the Command-Line and no errors are found.
Any Tip?
Command Line
Devices
Run Android Studio
SDK
You should first check if your system meets the requirements: https://developer.android.com/studio/run/emulator#requirements
Then simply follow the official tutorial in the Android Dev Docs: https://developer.android.com/studio/run/emulator#install
If then still errors appear you should take a look at the logcat in Android Studio.
I am having an issue with Android Studio not connecting to any devices. This includes physical devices, as well as emulators. Everything was working, but I updated AS to the latest version, and now it is not working. The devices still show as connected when I use adb on the command line, so I am able to run commands through that. However, I can not run anything from Android Studio, or debug, or use logcat. What could possible be the issue where adb is connected to the devices, but Android Studio is not?
Even using the connection assistant shows that I have a pixel connected, but AS does not recognize it as an android device.
This is for Android Studio 3.6.2, updated recently: Directory 'platform-tools' contains a directory of the same name, and I made the hypothesis that this was a bug and that the lower dir should not the there. Using the Mac Finder, I copied all files and directories from the lower dir to the upper one, I closed and restarted Android Studio, and voila, the Run > Select Device... can see my tablet, and I could run the app on it.
I'm running on a mac with Yosemite. I tried running old versions of Android Studio that were laying around which was a waste of time. So I got drastic.
This is a really bad solution, but has allowed me to actually get back to work.
Completely uninstall Android Studio and the Android SDK (the sdk might have been over-kill, but I'll let someone else figure that out). If you like, here's a website that helps uninstall AS. https://nektony.com/how-to/uninstall-android-studio-on-mac
Re-install Android Studio using an older version. I used 3.5.2 because I liked that color of green better than the new one. The link to find it: https://developer.android.com/studio/archive (you'll have to agree to their terms before being able to even look at the list!).
Run the newly-installed AS. Connect your device (remember to turn dev-mode!)...voila!
Well, it worked for me. And I only wasted 1 day.
I got a new laptop this week (Win10), installed Visual Studio 2015 community, followed by Xamarin. I've created a blank Android project, uncommented the SetContentView(...) line in MainActivity.cs, then build the solution. However I'm running into various problems when I try to run it:
The list of emulators (next to the green "run" button) only contains two entries: "Android_accelarated_x86 (Android 6.0 - API 23)" and "Android_ARMv7a (Android 6.0 - API 23)". Is this normal? The Xamarin doc'n seems to suggest that a number of "Xamarin xxx" emulators would be installed.
When I run the project against "Android_accelarated_x86", the emulator starts up, Visual Studio reports the deployment is successful, but Visual Studio stops debugging. In the output window I see this:
InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(0): Constructed
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
InspectorDebugSession(0): HandleTargetEvent: TargetExited
InspectorDebugSession(0): Disposed
If I hit run again, the app seems to start on the emulator, but then a message appears saying "Unfortunately xxx has stopped" (where xxx is my project name). The above messages appear in the VS windows again (apart from the one about 'Couldn't connect to logcat...').
I've also noticed that the "Manage Virtual Devices" item in the dropdown is greyed out, so I presumably can't try creating a different emulator?
Shooting from the hip on this one but do you have the Android SDK installed? It should install a number of other emulators and give you access to the device manager.
There are emulators you can INstal with Visual Studio. Emulators that come with the Android SDK and emulators that install with Xamarin Studio.
One additional thing to try would be to install Xamarin Studios. It does a slightly better job in my experience of setting up your environment then VS Does.
Firstly, the Manage Virtual Devices is referring to Xamarin Android Player VMs (which is now deprecated). We're working on getting this removed if Xamarin Android Player isn't present.
To create / edit / fix your Google AVD VMs you should select Android Emulator Manager. Regarding the number of devices listed, I'd probably ensure everything Xamarin is updated..
Visual Studio > Tools > Options > Xamarin > Other > Check for Updates
..and also update all your SDK components. If you have an Intel CPU you should use the x86 images for best performance. If you haven't already installed this you can get it here:
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
If you update any images it could be that your AVD needs repairing, which you can do in the Android Emulator Manager by selecting the relevant image and clicking Repair.
Also, you will only be able to deploy to devices that your project is targeting, so it's worthwhile checking the AndroidManifest.xml or by right-clicking your project and checking the 'minimum' and 'target' Android API levels to ensure you're encompassing the AVDs you have created.
While trying to use Visual Studio 2015 (community edition) to compile and run a simple Android app (the Hello World example you get when you create a new empty Android project in fact) I ran into the apparently well known problem that "run-as" does not work on some Android devices. In fact it does not work on any of those I tried running different versions of KitKat and Lollipop.
After successfully deploying the app, Visual Studio 2015 reports "Unable to start debugging. Android command "run-as" failed. Package com.Android1 is unknown"
I do not want to root the device to change the packages.list attributes, but I can successfully use "am start com.Android1/.Android1" from adb to run the app.
I would therefore like to modify the scripts kicking off the app execution in Visual Studio 2015 to use "am" instead of "run-as", but despite browsing through settings, makefiles, and scripts containing references to "run-as" I could not find where it's done. Is it possible to do it, and how? Or is there an alternative solution that does not require rooting the device?
I've just started a blank Cordova project on Visual Studio 2015, the intention being to use it to develop mobile apps in the future. I've been able to get it to run in the emulator on Android and even onto an iOS device (through a Mac), but I haven't been able to figure out how to run straight onto a WP8.1/Android device, or on a WP8 emulator. When I try, I get this message:
Error running one or more of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to run this project
The Android device also says, above that:
ERROR: Failed to deploy to device, no devices found.
There's very little documentation online, and because it's all so new, Google hasn't been particularly enlightening. It's possible that I'm missing some software, but I don't know what.
For the devices, it could be that I'm supposed to select the device from a list somewhere, but I can't see anywhere that could be. For the emulator, I'm assuming I'm missing software, or a setting is wrong on my PC, but have no idea what it could be.
To fix the issue with WP8:
I had been playing around with different versions of VS... un-installing and re-installing 2013 and 2015 and eventually hit the same issue as you.
The solution here worked for me:
No Emulator lists to deploy windows phone app
I do not have an android phone to test with t the moment, so I have not seen the android device issue.