Android Studio 4.1 updates gives internal error and can't start - android-studio

I have checked the newly opened threads about the issue but none fixed the problem
I am using a mac and I don't understand what should I delete to make it work. Or should I just completely delete the IDE and freshly reinstall it?

I am using Android studio 4.1 on Linux Mint 19.3 after update had the same error.
Some of the plugins(Marketplace and Makrdown) are not compatible with the new version.
Some suggestions were to delete /.local/share/google(but there was no such folder on Linux Mint 19.3)
I solved it by renaming(or deleting) marketplace plugin folder in /home/user/.var/app/com.google.AndroidStudio/data/Google/AndroidStudio4.1
After that Andorid Studio starts normal and plugins can be udated.

I just deleted and reinstalled the IDE and it works fine.
Google should really check their releases before going out official - If I were to work on an important project this would waste many hours for nothing.

Related

Unable to uninstall Atom System Image SDK from Android Studio

Each time I try and remove the x86 Atom System Image from my Android Studio, I am greeted with this message. The IDE log does not provide much data about what is causing the issue.
Is there something else that I may have installed that is causing me to be unable to uninstall this SDK?
I have removed all my AVDs from this machine.
I figured this one out.
In my ~/Library/Android/sdk/system-images/android-30/google_apis/x86/ folder there was an .installer file that needed to be deleted.
Once I did that, I was able to remove the system image.

could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRootsManager

My project works and builds successfully on my Mac but I cloned from github and although Android Studio appears to work normally, the project wouldn't build. I setup this project using Kotlin DSL.
Gradle sync failed: could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRoot
Tried invalidate cache, removed all .gitignore rules but it's still the same.
Any ideas?
I had the same issue (Note : Running Linux/Ubuntu 20.04 LTS and Android Studio 4.1.1).
Things I tried that did NOT work and error persisted :
Invalidate Caches / Restart
Reboot
Nuking the .gradle and .m2 folders
Android Studio re-install
Downgrade kotlin gradle plugin from 1.4.21 to 1.4.10
What did work :
Moving the project to a different folder/location on disk and open Android Studio
As soon as I moved the project back to the original location I would start getting the same error. This lead me to believe it was some sort of caching issue, separate from the caches "invalidated".
Solution :
Android Studio / Intellij creates a hidden folder called :
On Linux :
AS : ~/.cache/Google/AndroidStudioX.X
IJ : ~/.cache/Jetbrains/IntelliJIdea2020.X
On Mac :
AS : ~/Library/Caches/Google/AndroidStudioX.X
IJ : ~/Library/Caches/Jetbrains/IntelliJIdea2020.X
On Windows:
AS : %HOME%\AppData\Local\Google\AndroidStudioX.X
IJ : %HOME%\AppData\Local\Jetbrains\IntelliJIdea2020.X
Inside this folder are other various folders, however I removed the relevant workspace file (workspace/[project name].[hashed value].xml) after which problem went away when opening the project again, from its original location.
So it appears that "Invalidate Caches / Restart" does not "Invalidate" all caches!
I hope this resolves you problem!
Update
As this answer has had quite a few upvotes it would appear that this might be a ongoing bug with Intellij. If anyone has this problem, before resolving with the suggested solution consider checking there isn't an open issue on the bug tracker and submitting a new issue : https://youtrack.jetbrains.com/issues
Feel free to edit this update with issue if one is opened.
Update 2
Issue opened by #GeniusRUS :
https://youtrack.jetbrains.com/issue/KT-44937
For Mac users delete the following file:
~/Library/Caches/Google/AndroidStudio4.1/workspace/<your_project_name>.58dfbe93.xml
PS: Thanls #Mark Keen for solution.
basically i deleted .idea folder and then invalidate and restart ... error goes away and built successfull.
This probably isn't the "correct" solution, however, it worked for me. I had to download a newer (Canary) Version of Android Studio to get this error message to go away and to finally build my Android project once again. I found this YouTrack JetBrains issue where people also suggested reverting to previous, known working, versions of Android Studio to get their projects to build again.
This is a SUPER frustrating issue and I hope that one of the approaches resolves your build issues for you!
Here are the Android Studio Versions Download page for convenience.
After moving projects and files around I had also the honor to enjoy this error in Android Studio 4.1.1 (under Windows 10). Unfortunately, none of the above solutions worked for me but they helped me to narrow down the issue.
So, I found that there is a folder with workspaces under:
%HOME%\AppData\Local\Google\AndroidStudio4.1\workspace\
There are a couple of *.xml files named like the android projects. I deleted the one that didn't work.
Then switched back to Android Studio and used the Files > Invalidate Caches / Restart... feature. Android Studio restarted and the problem was fixed.
Bonus: How I found the workspace folder?
I used the Procmon.exe from Sysinternals where I filtered by the Process Name = studio64.exe. I then used the elephant-with-the-arrow button (Sync Project with Gradle Files) in Android Studio. At the end of the recording there was the workspace folder that Android Studio used just before Gradle failed.
I added a "problem" ticket to YouTrack, where I described my case in detail.
The support agent said the issue has already been fixed in the IDEA 2021.1 platform.
And also gave recommendations for this case
Link to issue
https://youtrack.jetbrains.com/issue/KT-44937
I fixed the issue by changing the root project directory name. You can try that.

Android Studio 4.0 doesn't recognize any previous virtual devices

First post--be gentle. Can't find any posts on Android Studio 4.0, so I hope this isn't a repeat. I updated Android Studio from 3.6.3 to 4.0 on Windows 10 (1909). Had created a couple of virtual devices in 3.6.3 (a Pixel 2 running API 28 and a Pixel 3 running API 29)--both worked great in AS-3.6.3 and I could develop apps, compile, load, and run them with no problem.
After the update to AS-4.0, the virtual devices no longer appear in the devices box at the top of the GUI--it just says "No Devices". When I open the AVD Manager, I can see them, and I can start them (although when I start them I get a pop-up saying "AVD Manager: Unable to locate adb"), but I can't get any code to download and execute on it. On the Pixel 3 emulator, I also get another pop-up saying "Detected ADB: Could not automatically detect an ADB binary.", and it gives instructions to resolve it, which don't make any difference (jump into extended controls and toggle "Use detected ADB location").
When I try to open a past project and run it, I get the same behavior--no devices found.
I've also tried making new emulators, hoping the new setup would recognize them, but to no avail. Tried starting and restarting AS, as well as the computer, also to no avail. I have Android SDK Build-Tools 30-rc4, the latest Android SDK Command-line Tools, Android Emulator 30.0.12 Android SDK Platform-Tools 30.0.1, and the Intel x86 Emulator Accelerator all installed.
I've Googled and spoken words of fierce power over this for several days now. Any suggestions for how to get AS-4.0 to recognize the emulators? I've resisted uninstalling everything and starting over--was hoping it was just a configuration thing.
Thanks in advance,
Uber
After some more Googling, I found the answer here (I think my constraint of wanting an answer for AS-4.0 specifically kept me from finding it):
Could not automatically detect an ADB binary - Android Studio
I had to redownload the SDK platform-tools zip file and reinstall it. I don't know why the old one got messed up with the migration from AS-3.6.3 to 4.0, but there you go--such is life with complicated software.
As soon as I replaced the old platform-tools directory with the new one, all my old emulators showed up and I was back in business.
Thanks anyway!
Uber

emulator not showing up on android studio

I've searched all over the web for the past 3 days and can't seem to find a solution. I've done everything mentioned in this post:
Android emulator not showing in Visual Studio
It seems all the 'working' solutions to this problem has been stated in what this guy says he did in his original post, including restarting ADB server (kill and start), restarting my computer, reinstalling emulator and HAMX, installing and running as an admin, changing the timeout delay, reinstalling almost everything, making sure my emulator is installed, etc.
It keeps saying Gradle build finished in 475ms, etc and then waiting for target device to come online for like 5-10 minutes and nothing happens. No emulator shows up. I can't seem to find the solution to this and I am on the verge of giving up, I really need Android Studio to work so I can start on my app.
Can I please get some guidance with this?
If it's relevant, I'm using a Mac.
Have you tried this. Go to the emulator settings and set the Graphics Emulation mode to Software GLES. The default mode will be automatic. I am not sure how it works, but that worked for me on two Linux machines. Being software emulation, the performance of the emulator will not be as good as when using hardware graphics. It seems to be a bug with the SDK.
For me the only thing that worked in macos was to disable docker before starting Studio.
Wipe the data of your Android virtual Device and then start the emulator.
I was using Android studio 4.2 and faced this issue.
No Solutions worked for me so I just erased android studio files. Updated to Android Studio Arctic Fox.
Link to remove android studio files from mac : How to completely uninstall Android Studio on Mac?
For Windows : How to completely uninstall Android Studio from windows(v10)?

Android Studio for Mac not opening

I am not able to get Android Studio running on Mac, even after waiting for 15 minutes or so, it's still stuck on this screen:
What could be the problem?
Android Studio v2.2.3
MAC OSX 10.12.1 on MacBook Air
Its just downloading necessary elements and SDK if necessary. So please check your internet connection and give it some time to finish the download.
I faced same problem. Found the solution..
Just delete all files related to AndroidStudio first.. you can refer
https://gist.github.com/tahmidsadik112/f08356d14a85d898299a
Now install AndroidStudio again and if you are behind any proxy then after launch setup the proxy with authentication.. That's it!!!
For me it was a bit different experience, when I tried opening Android studio for the first time in my Mac. It allowed me to create a new Project and then while loading the IDE it got stuck -
The IDE was not getting opened. Apparently it seems like it was downloading something of size around 250 MB. I was stuck there for around 30 mins.
Then after 30 mins when the IDE opened, it threw an error and asked to install missing platform and sync project.
I clicked on the link and a new installation started of Android SDK Platform 26.
After the SDK Platform being installed it threw another error and asked to install the SDK build tools. On clicking the link the installation started:-
Finally after the installation of the SDK build tools, I was able to open the Android studio and access the code error free:
Happy Coding!! :)

Resources