Can't connect any virtual device to android studio - android-studio

I am trying to set up my android studio to connect or read the virtual device i fail every time !
i tried to download (intel X86 emulator accelerator (HAXM installer) ) but the download every time does not completed successfully with a message ( please file a bug to intel )!!!!
when i'm trying to run the app from the cmd it gives me a message that (No supported devices connected.)
when even the virtual machine is running and i click run to RUN my App it gives me that error :
'Dart' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Exception: Gradle task assembleDebug failed with exit code 1

Did you open the virtual device and opened flutter console and entered "flutter run" oh android studio also works
I had a similar error: "Could not find or load main class org.gradle.wrapper.GradleWrapperMain Exception: Gradle task assembleDebug failed with exit code 1"
Try flutter doctor in the flutter console and run flutter pub get on your project
Note: I'm not the best at this stuff
Edit:
Using a physical device is probably better...
Virtual devices are extremely laggy for me (windows 10) and it's just hard in general.
Edit 2: (important)
Did you install the flutter plugin?
Did you do:
File>New>New flutter project>Select flutter application?
This is what solved it for me

Related

App installation failed on Android Studio Emulator

I'm new to Android Studio and tried to running a bunch of apps but they seem to never be able to install on my emulators. Instead I get this error:
"Installation did not succeed.
The application could not be installed.
List of apks:
[0] 'C:\Users\jlbr1\OneDrive\Escritorio\Fall22\MyApplicationQuiz\app\build\intermediates\apk\debug\app-debug.apk'
Installation failed due to: 'Failed to install-write all apks'
Retry
Failed to launch an application on all devices"
I already wiped the data of my emulator on the device manager and set the space available to 4098MB but when I try to run my code I get that error.
Any idea on how to fix this?

Why can I run a simple counter application through an android simulator but not through an ios simulator?

I am trying to run a sample application that creates a counter on both an android simulator and an ios simulator. The android simulator is created through android studio and the ios simulator is created through xcode. The application works well on the android simulator, but not on the ios simulator when following the same steps. Any ideas on how to fix this?
This is what the return is:
Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done. 10.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11.
Type in your shell open ios/Runner.xcodeproj the on XCode go to Runner -> Targets Runner -> All
And check you have a Team selected and also if it's a physical device you granted the permission on the iPhone.
Steps: https://i.stack.imgur.com/Qeh7p.png

Could not automate an ADB binary

Anytime I launch my Android emulator on my Kali machine I get an error message saying "Could not automatically detect and ABD binary",what could be the cause and solution and also when I launch my Android studio and I try running my app in the initializing adb part it keeps loading without showing my Android emulator which I already created...Please any suggestions on how to solve this

React Native Could not create ADB Bridge Error

JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Download https://jcenter.bintray.com/com/facebook/react/react-native/0.20.1/react-native-0.20.1.pom
....# a bunch of downloads here
:app:assembleDebug
:app:installDebug
05:13:20 E/adb: Unable to obtain result of 'adb version'
:app:installDebug FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: Could not create ADB Bridge. ADB location: D:\Android\sdk\platform-tools\adb.exe
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I'm using Windows machine and the android studio and have followed the tutorial over at
https://facebook.github.io/react-native/docs/getting-started.html
I'm stuck at this as i cannot run the 'react-native run-android' on command prompt
Also, running adb version gives
Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android
I have solved this problem ..if you are using emulator then follow React-Native, Android, Genymotion: ADB server didn't ACK... if you are using your device over usb for development then it is an error of your adb path.. set the path to D:\Android\sdk\platform-tools... in pc properties->advanced settings->environment variables->system variables..it worked for me.
I have another solution, If you are using emulator then make sure its running before you start you react native app. Some time you may need to close the application(like skype) those are using same port:8081(default used by react native application) before running react native app.

Android app is not launched in emulator in Android studio

I created an app in Android studio. It builds and runs on my phone but, When i run emulator it runs and shows the phone.
The output:
emulator: WARNING: Crash service did not start
qemu-system-i386.exe: -drive if=none,index=1,id=cache,file=C:\Users\one\.android\avd\Nexus_5_API_23_new.avd/cache.img: could not open disk image C:\Users\one\.android\avd\Nexus_5_API_23_new.avd/cache.img: Could not open 'C:\Users\one\.android\avd\Nexus_5_API_23_new.avd/cache.img': Invalid argument
How to fix this?
It may be bad, but it´s working for me:
First, go to your SDK folder (i.e. %localappdata%\android\sdk)
Open the "tools" folder.
There you find an "emulator-crash-service.exe" file. Copy it to the same folder and rename it to "emulator64-crash-service.exe".
Go back to the SDK Folder and go to the subfolders "extras\intel\Hardware_Accelerated_Execution_Manager\" and launch the "intelhaxm-android.exe" to install the HAXM driver manually.
Now create a new AVD and it should start.
I solved this problem by:
- redownloading Android x86 image (64bits/api23/google_apis in my case)
- creating a new virtual device and choosing Nexus 5 instead of Nexus 4
I'm not sure if all steps are required.

Resources