The android studio "run" button does not appear - android

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.

Related

Android Studio regularly stops supporting code highlighting and Hot Key support

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.

Android Studio no longer shows build directory in project pane's project tree

Android Studio used to show my build directories as orange directories in the project tab when displaying as "Project" (as opposed to the "Android" view). Now the only way I can verify if the build succeeded is to open a file browser or a terminal. How can I unhide the build directory and display all items in my directory via the Project pane? i.e. I don't want Android Studio filtering/hiding anything. I want to see everything in the directory.
OS: Ubuntu 20.4
Android Studio:
Android Studio Arctic Fox | 2020.3.1
Build #AI-203.7717.56.2031.7583922, built on July 27, 2021
Runtime version: 11.0.10+0-b96-7249189 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-80-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: com.thoughtworks.gauge, org.intellij.plugins.markdown
Current Desktop: ubuntu:GNOME
Click on the settings icon on the project tab and make sure "Show Excluded Files" is checked.

Blank/No xml preview in Android Studio

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

Android Studio IDE v4.0 project files not clickable/missing toolbar

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

Android Studio Crash on Code autocomplete

Android Studio Crashing after press "Ctrl + Space"
System Config - macOs Catalina 10.15 Beta
Android Studio - 3.4.1 and 3.5 Beta 5
I have already tried
Invalidate Caches/Restart
A workout around is to add -Dsun.font.layoutengine=icu to the VM options.
Which you can do via Help > Edit Custom VM Options.
Source: https://youtrack.jetbrains.com/issue/JBR-1639
Yes there is issue in All intellij IDE causing crashes on Mac Os Catalina Beta 2, From the logs I see that IDE crash because of OpenJDK, Android Studio was working fine on Mac Os Catalina Beta 1, but started crashes on Beta 2, I downgraded back to Mac Os Mojave because it was impacting my production machine, I learn that never use Beta on Production machine. I advice you to downgrade your Mac Os to stable version. Or wait for intellij to update their apps to support Catalina.
You can go to /Applications folder and right click on Android Studio then select Show Package Contents , Goto to Contents/bin/studio.vmoptions and add at the end of the file :
-Dsun.font.layoutengine=icu
Restart the IDE.
Switching IDE java runtime to Oracle JDK 8 worked for me. To switch the IDE Java runtime:
Install "JB SDK Bintray Downloader" plugin (screenshot) in Android Studio
Follow the instructions under All platforms: switch between installed runtimes section to change the IDE java runtime - instructions
I've been using it for 2 hours now and no crash, no slow-ness, etc.
enter image description here
1) Update your Macbook OS to get latest in my case it was : 10.15.3

Categories

Resources