I have a mobile app apk file and want to run it through the android studio emulator and inspect network requests with chrome//inspect. To debug webview in the app.
But when I go to chrome//inspect. I can see the emulator but not inspect link.
I am not sure why the inspect link doesn't appear and whether I could inspect the emulator in the first place.
Suggesting me alternative ways to debug webview on Macbook will also be appreciated.
PC: Macbook 16 pro / MacOS Ventura 13.0.1
I don't have the source code of the app, Only apk file.
Thank you for your help!
Related
I want to conveniently develop Desktop applications using Flutter & Android Studio. Currently Flutter Desktop Apps run only on the master channel.
I'm able to flawlessly enable MacOS as a flutter device with export ENABLE_FLUTTER_DESKTOP=true where my macos laptop shows as the following device:
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.14.5 18F132
I can launch the app directly on desktop with flutter run
Which Run/Debug configuration should I choose to automatically build & launch Flutter app from Android Studio?
Flutter ver. Channel master, v1.9.8-pre.108
EDIT: as #smorgan correctly suggested, just run:
flutter config --enable-macos-desktop
Remember that you also need to have macos build target in your app workspace:
You should not use ENABLE_FLUTTER_DESKTOP; any instructions referencing it are out of date. You should instead run flutter config --enable-macos-desktop as described in the official documentation.
That approach will enable desktop support everywhere, including Android Studio, rather than just the current terminal. Once you do that, normal Flutter workflows in Android Studio will work for desktop.
I'm a beginner in Flutter and I've an emulator opened/powered on and android studio doesn't detect it.
Hence I can't run any program because "no device is running". I've tried installing 'Android emulator' in the SDK tools but android studio still cant detect it.
Android Studio device list shows "loading" and no devices connected. Thus, I opened emulator but I cannot run flutter on emulator on Android Studio. After 5 hours I found that the reason is the new Flutter version.
I solved with choose different version of Dart and Flutter!
You need to download 1.17.3 version. Quick download link: Dowloand Flutter SDK 1.17.3 Version
And switch Stable Channel & Dart: 2.8.4, this is important. Also, if you want, you can check all versions of Flutter SDK: Flutter Versions
On MacOS, just write terminal: flutter channel stable
Note: If this answer is not working for you, you can open android module of your flutter app in Android Studio. It can be helpful when you try to add Firebase skills.
I had same problem.
CMD: flutter devices
No devices detected.
CMD: device emulators
Device emulator-5554 is offline.
In Android virtual device manager, I cold boot emulator and it started working.
In a windows platform I did:
If you have ran flutter doctor and there is no issues and if you can run your flutter app in cmd or using VSCode:
Just try to open Android Studio or IntelliJ as administrator by right clicking on the icon. This may list down devices and solve your problem.
The reason may be you have cloned flutter repository or you don't have right permission in flutter installed directory.
Run flutter doctor command to check whats the problem.
In terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device.
Check your flutter plugin whether it is up to date.
And read this flutter run: No connected devices , You may find the solution.
For me (on a Mac) I had the Android SDK installed in a custom location so I needed to set the ANDROID_HOME environment variable. In the terminal you can check what this value is with:
echo $ANDROID_HOME
I added the Android SDK to my .bash_profile (might be a different file if you are using Linux or Windows) for both ANDROID_HOME and PATH.
# already had these
export PATH="$PATH":"/opt/android-sdk/tools"
export PATH="$PATH":"/opt/flutter-sdk/bin"
# added this
export ANDROID_HOME="/opt/android-sdk"
Replace /opt/android-sdk with wherever yours is.
Then I updated the variables with
source .bash_profile
Testing with flutter doctor showed it was working.
flutter doctor
I restarted Android Studio and the emulator worked.
The last version of Flutter 1.17.5 (release the 2th, July) solved this issue for me.
Just flutter upgrade
run Flutter doctor to make sure you install everything.
run Flutter devices to see whether it is detected by flutter or not.
if you can find the your emulator there run flutter run -d <YOUR_EMULATOR_ID>
if you unable to find your emulator there may be you have to accept the android licenses . run flutter doctor --android-licenses to accept.
run flutter emulators to see list of emulators you have.
run flutter emulators --launch <emulator id> to launch
run Flutter devices to check whether emulator is detected by flutter or not.
run flutter run -d <YOUR_DEVICE_ID>
What worked for me is, updating Android Emulator.
Visit SDK Manager
Check whether any updates available for Android Emulator
If available, install the newest version
Hope this would be helpful!!!
I had this issue on Android Studio.
I had an emulator but it was not recognized even though the emulator was open.
I got around this by launching developer mode inside of the actual emulator by following the steps in this link: https://tweaklibrary.com/how-to-enable-developer-mode-on-android/#:~:text=How%20to%20Enable%20Developer%20Options%20On%20Android.%201,one%20of%20the%20most%20powerful%20...%20More%20items
After setting the emulator to developer mode, the emulator phone appeared as an option and when I ran the flutter hello world it appeared on the emulator.
Software
MacOS Sierra 10.12.6
Android Studio 3.1.2
Flutter 0.3.2 • channel beta
Tools • Dart 2.0.0-dev.48.0.flutter-fe606f890b
Flutter doctor (no problems found)
Problem
I am using Android Studio IDE to develop flutter apps, but I can't get any of the Android virtual device emulators to launch from the IDE. Whenever an Android virtual device is selected, such as the Pixel P, an error message appears saying "PANIC: the emulator program for the x86 CPU is missing". However, the emulator does work when it is launched from the command line:
$ cd /Users/$USER/Library/Android/sdk/emulator
$ emulator -avd Pixel_API_P
The problem seems to be specific to flutter projects, given that the same virtual devices are being launched normally with Android projects.
I changed the virtual device's x86 image to x86_64 and the problem was solved. Still don't undertand the underlying cause, but it worked:
ADV Manager > edit device > (name_of_device) Change... > x86 images > download & select x86_64 image
Check if your GPU rendering is activated in your BIOS settings.
Generally the BIOS keeps the GPU rendering off. You can change it, then clean your Android Studio, then reload your ADB.
Hope this helps. :)
I'm completely new to Android and Android Studio. I was just coding.
So I was running the previous version of Android Emulator and it worked perfectly fine.
However, when I downloaded the latest Android Emulator 27.1.12, my Emulator couldn't run properly.
Issue: The code is running fine, but the Emulator can't display my application. When I click on the Emulator screen, I can still hear the Audio of my app. So I think the problem would be with my computer's hardware.
Because the Emulator couldn't run, I uninstalled the Android Emulator 27.1.12 and Android Studio reported these errors:
Issue:
08:32 Emulator: [6684]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at C:\Users\dell\AppData\Local\Android\Sdk\emulator\lib64\qt\lib
08:32 Emulator: Could not launch ‘C:\Users\dell\AppData\Local\Android\Sdk\emulator/qemu/windows-x86_64/qemu-system-i386.exe’: No such file or directory.
So, when I install the Emulator, it crashes, when I un-install it, I encounter these 2 errors. So is there a way for me to use the Emulator without causing the 2 errors?
I am not sure from your question, whether or not you have uninstalled and reinstalled the AVD Manager, so in the case you haven't:
I suggest you completely uninstall and then reinstall the Android Virtual Devices SDK (AVD Manager).
You can use the following instructions to help you out:
To uninstall/install the AVD Manager, go to Tools > SDK Manager > Android SDK and select the SDK Tools Tab. Then scroll down until you find the Android AVD/Virtual Devices SDK.
Also, make sure that the Android Emulator SDK is also installed.
I see in the new update of Android Studio, the Android Emulator option is not enabled by default.
So, let enable it in the Settings as the bellow and run Android Emulator again.
Have Android 3.2.1 which you need to install emulator manually by going into
Tools > SDK Manager > Android SDK and then select the SDK Tools Tab. Check the 'Android Emulator' then Apply.
I am unable start android emulator on android version 2.3.3 after android Oreo installation.
At first it worked,but now after a weekend when i ran a project the emulator doesn't pop up.
AVD loading notification is shown as in the below screenshot(dummy screenshot image in reality the notification is different)
But it will not appear,I have completely installed every package related to android Oreo in the sdk tool manager
Still the same result,if anyone has the same issue and have found a solution.Please,help.
Try to use cmd command like
*path_to_your_android_sdk*\tools\emulator -avd *device_name, f.e Nexus_5_API_23*
It should give you some detailed output about what happened wrong or would launch emulator.
Also make sure you are using last version of emulator (you have added screenshots only for SDK).
If nothing works - just remove all related to emulator sdk tools and reinstall them.