I have faced some Windows user profile corruption problem. However I have recovered that and opened Android Studio. In Android Studio previously it stuck at Initializing. Then I have reinstalled whole Android Studio. After installation and opening my project, XML preview looks like
Tried Solution:
Invalidate cache and restart
Clean/Rebuild project
Deleting cache from C:\Users\xxxxxx\.gradle\caches\ and .gradle & .idea from project folder
Downgrading androidx.appcompat:appcompat:1.3.0 to androidx.appcompat:appcompat:1.2.0
Resotre default (from Android Studio welcome page)
Enable and Disabling Experimental>Use new Layout Rendering Engine
Creating new project to check it is problem with engine(yes it is problem with engine not my project side)
Anyother solutions highly recomended.
Edit:
No error shown in IDE.
My Android Studio details
Android Studio 4.2.1
Build #AI-202.7660.26.42.7351085, built on May 10, 2021
Runtime version: 11.0.8+10-b944.6842174 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin
Okay, Finally found defect
Tip:
No error shown in IDE.
We can still find IDE Log for more details Help>Show Log in Explorer you can find idea.log. Check for error in idea.log
My case:
java.util.concurrent.CompletionException: java.io.FileNotFoundException: C:\Android\SDK\fonts\com.google.android.gms.fonts\directory\font_directory.xml (Access is denied)
As I said my user profile corrupted owner ship of C:\Android\ is not changed causing Access is denied
Solution:
Run Android Studio as Administrator or Change ownership of SDK.
Hope may help anyone
Related
My android studio stopped showing the "run" button (before it showed this project without problems). I've tried several solutions like: "invalidate caches", "sync project with gradle files" and "try run using shortcut shift + F10", but none of it worked.
The selected module is correct.
My Android Studio Version
Android Studio Bumblebee | 2021.1.1 Patch 2
Build #AI-211.7628.21.2111.8193401, built on February 17, 2022
Runtime version: 11.0.11+0-b60-7590822 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: com.wakatime.intellij.plugin (13.1.14), org.jetbrains.kotlin (211-1.6.20-release-275-AS7442.40), com.developerphil.adbidea (1.6.4), org.intellij.plugins.markdown (211.7142.37)
I managed to solve this problem as follows:
Click "build" on the top bar of Android Studio;
In the menu that opens, access the "clean project" option;
Go to the "build" option again;
In the menu that opens, access the option "rebuild project".
As IntelliJ products are very highly customizable, it is possible that you deleted the Run button.
Go to
Android Studio > Preferences > Appearance & Behaviour > Menus and Toolbars
Search for Toolbar Run Actions / Run/Debug
If you do not see Run, you may restore by Restore Actions
Hope, it helps.
In Android Studio Dolphin
Go to TabBar -> File -> Repair IDE.
Look warning and click repair index.This was solved for me.
ndk , cmake , and alot of other features aren't showing in my sdk manager and i dont know how to instal them to android studio
i tried several solutions including changing proxy settings , changing local time and date of my pc , trying diffrent pc , i updated android studio and even i tried vpn
still most features is not showing at all
here is a picture of my sdk manager
i searched for weeks but still got no working solutions
my android studio details :
Android Studio Bumblebee | 2021.1.1 Patch 2
Build #AI-211.7628.21.2111.8193401, built on February 17, 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: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: artsiomch.cmake (213.1.6), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40)
thanks
Finally after several trials , i simply removed everything and even resets my laptop .. then everything is working fine now after reinstalling java se and android studio
I have recently upgraded Android Studio to this version
Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin
Since this upgrade, Android Studio constantly stops working correctly...
In as much as it stops code highlighting, code suggestions, compile errors, pretty much everything that makes it a useful IDE stops working.
The only actions I can take to repair this useless state is to either Close and reopen Android Studio or Invalidate Cache and restart Android Studio.
Is there any configuration settings I ned to change/set?
Is there anything I can do to resolve these issues?
This unexpected/unwanted behaviour is having an adverse effect on my teams productivity
Try to increase heap size.
Go to Preferences (Mac Os)/File (Windows) -> Appearence & Behaviour -> Memory Setting.
Check if multiDex is enabled in Gradle
android {
.....
defaultConfig {
............
multiDexEnabled true
}
}
This helped me when I got stuck with the same problem using Android Arctic Fox: I installed Android Bumblebee preview beta and problem disappeared.
I am facing an annoying bug in the newest Android Studio IDE (v4.0)
After the IDE restart(simple restart or after the PC restart, I can find any 100% case to reproduce this bug) sometimes AS starts and opens the project with such bugs:
Project structure becomes collapsed or hidden
Project files are NOT clickable in any case, so I can't close or open any files
Studio shortcuts do not work at all
The top toolbar is missing. (But still, it is shown as enabled in the "View" dropdown menu)
Some AS windows do not open. (For example, I am not able to open "Check For Updates" window)
I tried invalidating caches/restart option, but it makes no sense. The only solution is to delete AS studio(Without or with deleting of the settings), then install the older version of AS and make an update to the latest version of the AS.
If I try to simply delete AS and then install the latest 4.0 version, it will have the same bugs as were before the reinstall. If I want to install 4.0 studio without and older version-update routine, than I need to delete all the AS user settings.
What a hell is going on? Someone else facing this issue? Is there is a workaround for this annoying bug?
AS details:
Android Studio 4.0
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 16
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: org.jetbrains.kotlin
delete C:\Users{username}.AndroidStudio4.0 folder then try to open the android studio you will re install all the configuration and file support for android studio
AVD Manager in my android studio was working fine, until an unexpected shutdown caused AVD Manager to act weird. Now I can't run any AVD's.
When I click any system-image it says unknown error under recommendation. When I click finish it says:
An error occurred while creating the AVD. See Idea.log for more details.
Here are the screenshots:
I was able to solve this using this solution.
[Delete] *.ini files from a directory home//.android/avd It's for
Ubuntu. In Windows it's also in the user's folder (.android/avd).
I deep dive into this issue and found the following solution.
There was a problem to run mksdcard sdk tool. Some SDK tools such as mksdcard.exe require Microsoft Visual C++ runtime. So go to your System properties and check your System type:
Then based on your system type,(for me it was x64) download/update the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 from the link https://visualstudio.microsoft.com/downloads/
After installing Microsoft Visual C++, the problem was fixed. Also the Unknown error problem was fixed and I was able to create the avd successfully.
The problem resolved by reinstalling android studio
First, go to control panel,
Remove, if exists Microsoft Visual C++ 2015 Redistributable package x86 or x64,
Then, go to this link, https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
download Visual Studio 2015,2017,2019,2022 latest package x86 and x64 version. Install two version then,
restart pc,
Error is gone...