How to connect flutter to Bluestacks emulator? - dart

I'm setting up an Android device for flutter development and need to have a lightweight emulator. How do I connect bluestacks to flutter? Since the android studio is too slow for my machine and I only have an iPhone.

Yes, You can connect Flutter to Bluestacks.
You have to enable adb on Bluestacks' configurations, by following:
gear icon > Advanced configs > (marks as true: enable ADB connection)
after that, you must to restart your bluestacks, then open a terminal and go to your Android SDK folder:
%localappdata%/Android/Sdk/platform-tools/
then type the follow commands:
adb connect localhost:5555
So, by now if you type flutter devices you will get the emulator device name on the list, then you can run your apps on it

In this case what I would like to suggest you is to download GenyMotion.
Is a very lightweight emulator and it has its own plugin for Android Studio.
I was on a similar situation with an AMD processor and this was a really helpful way for me to test my apps.
Here is the URL for download: http://cloud.geny.io/

Steps
Install the latest version(4.180.10.1006) of bluestack
Open the bluestack
Enable the adb by setting>preferences>tick "Enable Android Debug Bridge"
Open the cmd
Create a flutter project by typing "flutter create [projectName]"
Access to your project folder by typing "cd projectName"
Run flutter app by typing "flutter run"
How to enable adb over bluestack
Step1 - Click the setting(gear)
Step2- Click the preference
Step3 - Scroll Down to Enable Android Debug Bridge

Hello, I hope it's not too late for you - but:
You can use sublime text as editor and for running your app.
You can use command prompt (cmd) on windows and as an emulator, you can use Genymotion.
It will fit for you if you need a light editor along with a good emulator that does not take too much RAM space.
I have tested it, and it was running perfectly.
However, the problem were flutter packages for sublime text(coding helper).
I couldn't find any packages for sublime text, only dart. You can update the question for further information.
I hope you understand this and it will help you.

Related

Unable to add apple device in Android studio

I want to try out the Kotlin Multiplatform Mobile (KMM) in Android studio. I have installed the Plugin and when I try to add configuration for IOS, nothing shows up. I just have an IOS option but nothing shows up when I click on it. The android device is already set up, so I was able to run it in Android.
I guess you are not running Android Studio on macOS. You must have macOS to compile through XCode and use Apple Simulators.
If you are running AS on macOS and you created the project with KMM plugin it's weird that you don't have the run configuration for iOS already set up, but you can try to click on the + button on the upper-left corner. Remember that you must have XCode (and Simulators) and command line tools installed on your machine.
If you are running AS on an OS different from macOS you can only compile the non native (not macOS or iOS) part of the library.
Had the same issue. What fixed it it for me was installing Xcode command line tools with xcode-select --install.
If that doesn't work, generally check the integrity of your Xcode setup.

Android Emulator not running

I am new to mobile development. Trying to follow tutorialspoint for my first xamarin android app. The emulator fails to start.
Emulator is set to use android 9.0. When running directly from Tools -> Android -> Android Device Manager, emulator runs but crashes. When running from Visual Studio debug, comes up with following error.
"Starting emulator testdevice ...
Checking HAXM compatibility.
Emulator testdevice cannot be started.
Runtime checks completed
NuGet package restore canceled."
where 'testdevice' is the name of my emulator.
Have been on Tools -> Android -> SDK Manager, then on Tools tab. Then Under Extras, I've selected the HAXM installer and clicked apply changes.
I've been looking online but nothing seems to help.
You might want to verify haxm support. On a command prompt type
sc query intelhaxm
For more info, refer to
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows

Not able to inspect element in IOS webview on real devices

I am using appium 1.8.0 with and launching webview from my app. For that webview In IOS I am not able to get the page source and not able to do any operation.
The same thing is working on android.
Do I have to do any steps to enable the IOS webview to get the page source?
The best suggestion could be to use something you are already familiar i.e. chrome dev tools which you have used for android webview inspection, same thing can be used for ios webview also
Install node module
npm install remotedebug-ios-webkit-adapter -g
Start the adapter at port 9000 - This will auto start "ios-webkit-debug-proxy" (Make sure this should be installed as a prerequisite on mac machine)
remotedebug_ios_webkit_adapter --port=9000
Open chrome and navigate to chrome://inspect and iOS targets will show up
More details here on the tools github readme file

Can ios simulator can be run in Windows

I m working on appium scripting for mobile application automation testing.
I m able to simulate android device using the emulator and run the script in the emulator.
Now my next task is to run in ios. Please let me know it is possible to do it in ios emulator in Windows machine. If so some headsup on it.
You can not. There are platforms like React Native, Flutter, Xamarin, etc which enables you develop iOS applications; but when it comes to debugging and deployment, you have to have a macOS, which in turn requires a Macintosh machine.
Yess you can use Remote simulator to windows by enabling it under
Tools >> Option >> Xamarin >> IOS setting >> Remote simulator to windows.
But you still need active mac agent connection to build your app
You can use Appium studio free community edition for testing iOS physical device from windows machine.
note:- I have tested appium studio personally and think it will be useful for others.

iOS emulator no longer running from command line using phonegap

My iOS emulator is no longer opening when I run "phonegap run ios" in the terminal on Mac OS X. I receive no error messages and:
[phonegap] Platform "ios" deployed to emulator.
[phonegap] successfully installed onto emulator
While this is currently a known bug, you can run the emulate command more directly (note you need to build separately):
phonegap local build ios
/platforms/ios/cordova/emulate
You can also run the application using the same technique:
phonegap local build ios
/platforms/ios/cordova/run
NOTE: When using this method to run the app on your phone, the task might get stuck on the splash screen. To fix this, launch the Activity Monitor on your Mac and quit any processes with the name "ios-deploy". From there you can launch the application on your phone by clicking the application icon.
Or, you can even look inside the generated /platforms/ios folder and launch XCode project directly to test in an emulator or on your device. Open project and click the RUN button.
IMPORTANT: with all of the above methods, you MUST run the build command before running:
phonegap local build ios
Not really an answer, but I can say this is a known bug. Here is the bug so you can track it:
https://issues.apache.org/jira/browse/CB-5103
I only had this problem after upgrading to 3.1. I downgraded to 3.0 and it works more reliably:
npm uninstall -g phonegap
npm install -g phonegap#3.0
Also had to delete the platform/ios dir and plugins/ios.json and then run 'phonegap build ios' and 'phonegap run ios'

Resources