Android Studio recognises device, but not able to run code - android-studio

I am using an old smartphone as a device to run my app on in Android Studio. I recently switched to a new computer, so I reinstalled AS on that computer according to the docs. Android Studio recognises my device, but I'm nota ble to run my (Flutter) app on it, and the name of the device is marked with a small green dot.

I'm not entirely sure if that was the problem causing this, but AS said that my Dart SDK was not installed. After installing and restarting, I was able to use a device to run my Flutter app.

Related

Stuck at the "waiting for all target devices to come online" message even though emulator is already running Android Studio 4.2.2

I am having trouble running an .apk file on an emulator in android studio (4.2.2). I am using an M1 chip Mac so I've chosen the S api with arm64 CPU. I cannot seem to get android studio to recognize the emulator is running. I've attached an image to show that the emulator is running properly . Any help would be appreciated! I've tried wiping the emulated data as well as reinstalling the emulator. For reference I am using Andoid Emulator version 30.7.5 and Android SDK tools version 30.0.2.
Wiping emulator data solved it for me

How to run Android Studio emulator on M1 Mac?

I'm having a devil of a time using the Android Emulator on my new M1 Mac. My Android project compiles fine, and I can run it on a hardware device. But I'm not able to run it on the Emulator.
I followed instructions carefully, and set up an arm64-based emulator running API 31. When I press the "Run" button in Android Studio, the emulator opens and boots normally. However, Android Studio is never able to launch my app on it. I see a message "Waiting for all target devices to come online", and that's it.
I have of course tried restarting the emulator, restarting Android Studio, rebooting my computer, and wiping the data from the emulator. I have also made sure that Developer mode is enabled in the emulated Android environment and "USB Debugging" is turned on.
Another suggestion I saw was to un-check "Enable ADB Integration" in Android Studio. This option doesn't exist in my copy of Android Studio, although I did some further research and found that it is now called "Use libusb backend" instead. It is unchecked by default. I tried checking it anyway, and that didn't help.
I'm at a loss as to what to do next. I really need to be able to test my app in the emulator as my inventory of physical devices is fairly limited.
Thanks,
Frank
Download Android Studio Preview, create emulator (API 30 or S), now you can use emulator on both preview or stable Android Studio.

android studio is not able to recognize my device

I am using Flutter for developing my android apps but for some my android studio is not able to recognize my device even though my device is detecting that fully. Is there a way to fix this?
And also for the record, I have tried all the possible methods available on stack overflow and internet like Enabling USB debugging, MTP Transfer, Installing universal USB Driver.
Some phones like OPPO, VIVO, etc is having an extra drivers. It will be shown when you connect your phone with pc. You have to install that driver too. Also check whether this phone is working with another computer or any other phones works in your computer too(to check both your phone and PC is ok). Also check in normal android app development instead of flutter, like checking your phone connection in android studio with java or kotlin.
if all this didn't works then install Visual Studio Code and check the same thing it it. may be this is some issues in Android studio. please inform the details here after all this.
Go to file> Invalidate cache/Restart > click invalid cache and restart button in android studio.
Then run.
If still cannot connect device:
goto file>settings> appearance & behaviour > Android SDK > sdk tools >deselect android sdk platform tools > apply>ok.
It installed the requested components.
then goto app > edit configuration> uncheck allow parallel run in right corner>ok

Not able to run Emulator using the Android studio for my Flutter app, getting NO CONNECTED DEVICES error

Please Note: I tried several available solutions but none worked for me since yesterday hence posting this. I have also mentioned below what are things I have tried so far.
I am new to Android Studio and Flutter application and I am trying to build a simple Flutter app using the Android Studio.
I have downloaded and kept my flutter files in C:\src\flutter. Also added to Environment variables.
I have installed the Android Studio and also installed the Flutter plugin with the Dart.
I created the Virtual Emulator Device using the Tools->AVD Manager and choose the Nexus 6 with the Android 8.1
Created a simple project using the File->New Flutter Project->Flutter Application.
When I try to run this application I get the following error:
As you can see in the screenshot it shows that the No Devices in the emulator section not sure how to run it.
Things I have tried so far:
If I run flutter doctor then I get a tick for all the things except Connect Devices. My guess is that it is obvious because I have not connected any external device but using the emulators.
I tried to create the emulators using the command flutter emulators --create Nexus_6 and tried to launch it using the command flutter emulator launch.
I tried running the Android studio as an Administrator.
Restarted the system several times.
My adb.exe was crashing so updated the windows and replaced it with the new adb.exe as mentioned in one of the solutions.
My flutter emulators show following list in the command prompt:
I tried checking the folder in Appdata -> Local seems to be fine as per other mentioned answers.
When I run the Emulator using the AVD Manager from Android Studio I see that it is firing up the Android Emulator but it is not responding. In addition to this, I also observe in my task manager that process adb.exe(32 bit) is running whereas my WINDOW 8.1 is 64 bit. Is this expected?
I am not sure If I missed something here. Please help me on how to solve the issue.
Using below command on Flutter worked for me:
flutter config --android-sdk [android-sdk-path]
The path is usually C:\Users<username>\AppData\Local\Android\sdk
this path can be found from android studio - SDK manager also.

Error creating virtual device in Android Studio

Yesterday, I installed Android Studio's latest version on Ubuntu. Everything ran fine, until I ran the "Hello World!" program. It asked me to create a virtual device. While creating the device, it shows me an error that the AVD manager cannot find a system image. This makes no sense since I have already installed the latest SDK (API level 25, Android 7.1.1). I downloaded the system image from the AVD manager itself, but to no avail.
Can someone help me sort the damn thing out? I switched from Windows to Linux due to the plethora of problems with Android Studio on Windows. But the thing's bugging once again. Here is a screen shot:

Resources