Android Studio emulator extended controls location screen not loading - android-studio

today I was trying to use location spoofing from adnroid emulator extended controls panel, but unfortunatelly it loads static map image with "raw" input that does not work anyway. I tried invalidating android studio cache, restarting OS, wiping AVD, deleting and setting up new AVD, updating emulator. None of these works. Yesterday it worked perfectly, today I can't get it to work. I can't even find similar problem on Google.
Here is info from "About Android Studio" tab:
Android Studio 4.1.1
Build #AI-201.8743.12.41.6953283, built on November 5, 2020
Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: Statistic, com.intellij.marketplace, org.jetbrains.kotlin, io.aesy.regex101, org.intellij.RegexpTester, com.developerphil.adbidea
And the location screen from extended controls:
Location screen
Anyone had similar problem?

You have to create new API key for your app and make sure to update your API key in your code, and it work like a charm

Related

Android Studio emulator will not open the chrome browser

System info:
Android Studio Chipmunk | 2021.2.1 Patch 1 Build #AI-212.5712.43.2112.8609683, built on May 18, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.199-1-manjaro
Issue:
If I try to open the Chrome browser in Android Studio's emulator, when I get to the "Turn on sync?" screen, if I tap "No thanks" or "Yes, I'm in" the emulator completely locks up. I'm unable to swipe and close Chrome browser or do anything. I can only crash the emulator. Then I "wipe data" and try again.
Anyone know how to get past this so I can open the Chrome browser in the emulator? Webviewer works just fine, but opening Chrome directly in the emulator does not.
I've tried different SDK's, but at this point I cannot find a remedy for this odd issue.
Screenshots:
Running the emulator with the -feature -Vulkan worked for me. You will need android emulator cli installed.
To see your avd devices enabled run: emulator -list-avds
In my case, I'm using Pixel 6, so i runned: emulator #Pixel_6 -feature -Vulkan
Worked like a charm.
PS: I actually got the answer from the author's issue at IssueTracker. Just posting this here to help others with same problem.

Android Studio Bumblebee crashes frequently

I am wondering if anyone else has encountered this problem and figured a way to deal with it.
Android Studio Bumblebee crashes randomly and frequently. There is no pattern. It crashes when I do something (e.g., editing code) or sometimes when I do nothing. It can crash soon after I start AS or after I use it for a little while. It crashes once every hour or so on average.
Are there any parameters that I can change to make AS stabler? Is there a good way to diagnose the crash?
I usually have over a dozen programs running on the same computer (Visual Studio, Outlook, browsers...). AS is the only program that crashes. All others work fine.
Android Studio Bumblebee | 2021.1.1
Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: com.intellij.marketplace (211.7628.36), com.thoughtworks.gauge (211.6693.111), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), com.android.aas (3.5.1), com.google.mad-scorecard (1.2), org.intellij.plugins.markdown (211.7142.37)
I faced the same issue until I disabled the Launch in tool window. Just go to File -> Settings -> Tools -> Emulator and disable the launch in a tool window checkbox.

Android Studio closes when wanting to open a layout

I installed the latest version of Android Studio on Windows 10 and when trying to open a layout, Android Studio closes completely. I have looked for a solution on the internet but could not find a solution. Every time it fails I get a text error report, I don't know how to interpret all this information, could you be so kind to help me solve this?
Text error report
A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x00007ff8bd2039af, pid=3032, tid=3188 JRE version: OpenJDK Runtime Environment (11.0.10) (build 11.0.10+0-b96-7249189) Java VM: OpenJDK 64-Bit Server VM (11.0.10+0-b96-7249189, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) Problematic frame: C [libandroid_runtime.dll+0xb39af]
No core dump will be written. Minidumps are not enabled by default on client versions of Windows
If you would like to submit a bug report, please visit: https://bugreport.java.com/bugreport/crash.jsp The crash happened outside the Java Virtual Machine in native code. See problematic frame for where to report the bug.
siginfo: EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d)
It's like it's something to do with memory, but I can't figure it out.
CAPTURE OF A FEW SECONDS BEFORE CLOSING COMPLETELY ANDROID STUDIO
enter image description here
I also had this issue and also posted it here earlier but noone seemed to know how to fix it or why it happends and neither do I and still dont.
I fixed it by downloading older/newer version of android studio.
You are probbably using Android Studio Arctic Fox since it's the first one that you get when you go on Android Studio site and click download.
Next to download button you will se download archives go there and download some other version.
Personally I downloaded Bumblebee Cannary channel and it works great.

Android studio 4.1 Emulator extended controls

Extended control settings/options are missing in this update? like sending sms, gps settings unable to find the settings any help appreciated.
To see the additional options you need to run the Emulator in a separate window (process).
To do so go to File...Settings... and then choose the following.
You'll need to uncheck the Launch in a tool window option.
After you do that and restart Android Studio and start your emulator, it will run in a separate window and you'll see the options you want on the ellipse menu item on the side of the emulator.
Here's my Android Studio version info:
Android Studio 4.1
Build #AI-201.8743.12.41.6858069, built on September 23, 2020 Runtime
version: 1.8.0_242-release-1644-b3-6222593 amd64 VM: OpenJDK 64-Bit
Server VM by JetBrains s.r.o
Linux 5.4.0-52-generic
Current Desktop: ubuntu:GNOME
Edit: September 2021
Now, since Android Studio Arctic Fox (2020.3.1) you can enable that in settings:
And you have it there:
Old answer
TL;DR
Currently, you can't use
Why
Base on documentation:
https://developer.android.com/studio/run/emulator#limitations
Limitations
Currently, you can't use the emulator's extended controls when it's running in a tool window. If your development workflow depends heavily on the extended controls, continue to use the Android Emulator as a standalone application. In addition, certain virtual devices—such as Android TV and foldable devices—can't be run in Android Studio because they have specialized UI requirements or important functions in the extended controls.
After hours of struggling, I finally started my emulator using terminal-command and I was able to see the extended controls. Followed this answer, https://stackoverflow.com/a/45201495/6869086

Canary build of the android emulator for AMD processor showing error

I am trying to run my app on canary build of the android emulator from android studio on AMD processor but I am getting the following error
1:47 PM Emulator: [2440]:INFO:android/android-emu/android/verified-
boot/load_config.cpp:236:Verified boot params were not found.
1:47 PM Emulator: **
1:47 PM Emulator: ERROR:/usr/local/google/buildbot/src/android/emu-master-
dev/external/qemu/fpu/softfloat.c:486:round_canonical: code should not be
reached
1:47 PM Emulator: Process finished with exit code 3
I got to know about the canary build of the android emulator for AMD processor from here. My virtual device' CPU/ABI is armeabi-v7a. I searched for what the 'exit code 3' for the emulator mean but I didn't get any solution.
Can someone help me please!
I got the android emulator working today.
I have done the instalation process for canary build of android studio from the beginning:
1. Enabled "Hyper-V" and "Windows Hypervisor Platform" in "Turn Windows features on or off" settings of Windows. This has been explained in here.
2. Downloaded the latest Canary build of Android studio from here.
3. After downloading the zip file I followed the guidelines in here under "Install alongside your stable version" heading. The guide lines are:
a. Unpack the ZIP file.
b. Rename the resulting folder to something unique like "Android Studio Preview."
c. Move it to a permanent location, such as next to your existing Android Studio install in C:\Program Files\Android.
d. Inside C:\Program Files\Android\Android Studio Preview\bin\, launch studio64.exe (or if you're on a 32-bit machine, launch studio.exe).
4. After launching studio64.exe I got a pop-up message to update Android emulator. After the update I created a new virtual device with an image of x86 with android 9.0. I started the android emulator to test my app. Though I got the
Verified boot params were not found
popup error message initially, the emulator started functioning well.
I am a very new Android developer and was until today having the same issue as yourself. Here is how I got it to work (Please note I am also on an AMD system).
Make sure you have enabled Hyper-V and Windows Hypervisor Platform. If you type "turn windows features on" in your run bar you should be able to locate it. Also enable virtualisation in the Bios. Mine comes under "SVD".
(Please note after this step I was still experiencing the problem but this is a pre-requisite).
Delete all devices from the AVD manager.
Install a new x86 device from the AVD manager. What I did here was select a version down from the one I was previously getting issues on so Oreo from Pie. When it asks to confirm if you want to wipe the user data please confirm positive.
Once setup, run the device from the AVD manager. It may ask you if you wish to enable Instant Run. I elected to disable this. (I had enabled it when I first was trying to run a device).
You will still receive the 1st error regarding no boot parameters but the emulated environment should load. You can now run the APP and it should install the APK. Previously due to the device not coming online properly, the APK would not install. I can also now setup a device on Pie without experiencing the issue so I think it may have been the wiping of the previous data that helped.
I wish I could tell you WHY this worked for certain and previously it would not work, sadly I cannot but hopefully this will get you working.

Resources