how to get the 'sync' icon back - android-studio

With android studio 3.1.4, it has been working fine but suddenly the "sync" icon cannot be found anywhere (did not make any change), happens to any projects now.
Also the combox next to the "Run" icon shows red cross and "This configuration cannot edited"
And it has only Project tab does not have the tab of "Android".
Must be some setting messed up. Is there a way

Looks like the Android plugin got disabled. Please go to Settings | Plugins, find "Android Support" there, check it and restart the IDE.

Related

How to make my emulator shows up outside of my android studio?

Recently, I updated my android studio to bumblebee version, and when I run my codes, I realized that my emulator are shown inside of my android studio instead of creating a new window for the emulator. you can see what I mean, here.
does anybody knows how to fix this? I already tried to change the settings but nothing is changed. should I reverse the update?
I had the same issue, to resolve it do the following:
In Android Studio: click on
File,
Settings,
Click on the Tools dropdown,
Emulator,
uncheck the "Launch in a tool Window" box
Settings with Launch in a tool window checkbox

LogCat Missing from Android Studio 3.1.3

I recently installed Android Studio 3.1.3 on my laptop in order to start learning android/mobile development (I am still new to all of this). The LogCat option seems to be missing though (refer to images below)
What I tried to do in order to fix the problem:
-uninstalling and reinstalling android studio (along with updating it...)
-researching the problem (no useful results as all the solutions were to press alt-6 or go to View->Tool Windows)
It would be a huge help/relief if someone knows how to solve this problem.
Thanks in advance.
I know it is an old question, but I encountered this problem at least twice so it might help someone.
The problem seems to be the path of the project you're looking at.
It should be pointing to the folder containing the 'app' and 'gradle' folders inside your project.
Go to File > Open
Select the folder with the 'app' folder inside your project
Press 'Open'
If you see something like this you can now probably open the Logcat window with alt-6 or View->Tool Windows.
Note that for some reason, it didn't work for me at first until I opened the app folder, run a build and then opened the folder containing the app folder.
You need to sync your project and then Logcat will show up
Just in case anyone stumbles upon this as I did: If you are developing a react-native app, be sure that you import only the android folder of the project.
If you import the whole project, then among other things, logcat is nowhere to be found!
Try pressing Alt+6 on Windows or CMD+6 on Mac.
I closed "Logcat" by accident via right click -> "Remove From Sidebar".
I was able to restore it with these steps:
Launch your current App on an emulator.
This should create a "Run" Tab on the Sidebar.
Click on the "Run" Tab and find the "Modify Run Configuration..."
(Wrench) icon and launch it.
Change the tab to "Miscellaneous".
Check the box next to "Show logcat automatically"
This is not a solution if Logcat doesn't even show up in View->Tool Windows!
But if it does: click it and it may show up at a different location than it used to be. Without recognizing I had shoved it to the top left where the project tab is shown. You can now click on the gear wheel on the tab and select move to bottom left (that is the default location).
This was the solution for my "logcat not showing".
Press Alt+6 inside Android Studio to open Logcat monitor.
Then, Do the following steps:-
Open Android Studio.
Open Android Monitor Window(at the bottom of android studio).
Here you will see the drop down in right corner.
Select Show only selected Application.

Logcat tab missing from debug window in Android Studio

Somehow I closed the logcat tab from the debug window and now I am unable to get it back.
In Run->Configuration->Logcat I have everything checked.
I do have the logcat tab in Android Monitor window, but not in Debug.
How can I get it back?
I created a bug on on their bug-tracker: https://youtrack.jetbrains.com/issue/IDEA-144525
I think with the release of Android Studio 1.4 the logcat tab has been removed from the Debug view. Now I believe the only place to access it is by opening the Android Monitor view by pressing Alt+6 on Windows or CMD+6 on Mac.
Release notes of Android Studio 1.4 Beta 3 allude to this:
Logcat view mostly rewritten to address a number of stability and usability bugs
In Android Monitor window, click the little tiny button on the top right corner.
No one has seemed to mention this, but make sure you are inside the "android" directory and not the root directory of your project (React Native). Logcat will not display otherwise.
Click on Android Monitor at the bottom of the screen.
and then you should see there are a tab call "Logcat" next to "Memory" tab.
In Android Studio 3.5.2, Logcat can be shown from View > Tool Windows > Logcat
For some reason in a specific project, it wasn't found using this way, but I could fix it as following:
File > Project Structure > Facets > Add > Android > my_module
While I would be a little late for the party, it has been a few years and new version of Studio.
Today when you encounter the bug, your logcat would not be shown, to resolve this you would need to follow these steps:
Menu -> Build -> Make Project
in your settings.gradle comment out everything and sync.
uncomment everything and sync again.
Menu -> Build -> Make Project
Once the project build is done.. your Studio would be ready.
I have encountered several different bugs related to this issue, this scenario covers most of these cases.
Given solutions not worked for me.
I found another solution
Click
View-> Tool Windows -> Logcat
Then the missing Logcat tab appears again.
Android Studio IDE version: (Android Studio Electric Eel | 2022.1.1 Canary 8)
It was working fine and it disappeared suddenly.
After nothing else worked, I ran adb devices to see if my device was correctly attached and TA DA.
adb server wasn't running and started automatically and Android Studio started to show Logcat as always.
➜ adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
0030713775 device
press alt 6.
If you still don't see it there should be a little icon in the top-right corner of the view, press that.
Top Menu:
View -> Tool Windows -> Logcat
Bottom bar:
View -> Appearance -> Tool Windows Bar

Android Studio Setup Wizard Stuck on Downloading Components

So far, I've run into a brick wall when trying to open Android Studio. Installation seems to run fine, but when I open the program for the first time, I am greeted with the setup wizard which informs me that it will be downloading components.
The first line in the dialog box tells me that the sdk has been installed in a specific location, which it then lists.
At the bottom, there are greyed-out navigation buttons for 'Back' 'Next' and 'Finish'. The 'Cancel' button is active, but when I click it, nothing happens.
There is no button for 'Show Details' to reveal what is going on behind the scenes.
Basically, this screen does not advance. I have tried on multiple different internet connections. I am not using a proxy.
When I hit cancel, the button becomes greyed-out, and nothing happens. The only way to exit the screen is to force close it in Task Manager.
I have tried running as an administrator.
I am currently running Windows 8.1.
Any ideas what is wrong?
You can download the latest components manually.
Go to C:\Users\Username\AppData\Local\Android\sdk
Open SDK Manager.exe
Update the packages.
Start Android Studio.
Solution for now was to use an older stable version. 1.0.2 worked fine.
Uninstall Android Studio and clean all the junk files, then reinstall it should fix that!
First, Run "Control Panel" ⇒ "Programs and Features" ⇒ Uninstall "Android Studio"
Then make sure to delete any of these files if exist:
C:\Users\username\AppData\Local\Android\Sdk (this directory contains the SDK).
C:\Users\username\.android
C:\Users\username\.AndroidStudioX.X
C:\Users\username\.gradle
C:\Users\username\AndroidStudioProjects (these are the Android projects written by you)
I deleted the folder /Users/USER_NAME/Library/Android/sdk and it worked.

In android studio,cannot load 2 facets-unknown facet type:android and android-gradle

When I open android studio I am getting an error- "Error loading project: Cannot load 2 facets. When I clicked to see the error the following appeared
"2 facets cannot be loaded. You can mark them them as ignored to suppress this error notification.
Unknown facet type:'android', Unknown facet type:'android-gradle'
I tried to add facets ( In Project Structure > Project settings > Modules > clicked project name, then clicked Android as well as Android-Gradle) But both showed as "cannot load facet, unknown facet type." Under Project settings > Facets > both Android and Android-Gradle are displayed as 'Invalid facets'.
My project was running smoothly. This problem occured when I force-closed my laptop before exiting android studio as everything got stuck. After that whenever I open the android studio this problem occurs. I am not able to run my project. Can anyone please help me to solve this?
Just enable Android Support plugin.
Click Ctrl+Alt+S in Windows or Meta+Comma in Mac.
In top search bar type "plugin".
On right side it will show a list of plugins, find Android Support plugin, check it and click OK at the bottom of screen.
This is how it looks:
In Android Studio go to
File -> Settings - > Plugins -> Enable "Android Support" Plugin.
File, Then Settings->Plugin->Enable/Renable Plugin --> Apply --> Restart
This problem occured when i'd updated Android Studio.
In case nothing from other answers works, you don't have another option, except removing broken settings and making clean setup.
So what i am suggesting:
Use Settings Repository Feature to store personal IDE settings
close studio
remove .AndroidStudioX folder from user folder
re-launch studio, do not copy settings from previous version (because settings probably broken and auto-import couldn't import it well)
import personal settings from Settings Repository
For me I went to Settings -> Plugins and de-selected Gradle then immediately re-selected it. Android Studio then asked if I wanted to enable Groovy so I said yes and let it restart and now everything is happy again! (it was checked, but clearly somewhere deep down not truly enabled, so toggling the check-box sorted it)
Not sure if my cause was installing Flutter, but I did have to disable the Flutter plugin before I could build again.
I had the same problem with an ever-increasing number of facets - first 2, then 4, then 5 - and none of the above solutions worked. My solution (Android Studio 3.3, OS X) was to delete ~/Library/Preferences/AndroidStudio3.3/disabled_plugins.txt, which contained org.jetbrains.android and org.jetbrains.maven
I imagine if you have deliberately disabled plugins then you'll have to disable them again manually, but I was able to load all facets again.
Go To ->File->Settings->Plugins->disable/enable Android Support Plugins->Press Ok
Just re-enable Android Support plugin. Then it will ask to restart.
Restart them thats it
I faced this issue in Android Studio 3.2.1 I had to re-import my project after that it works.
I was facing this problem, I tried everything but nothing worked but then I remembered that I updated Android Studio just few hours back and then I enabled the plugins in the Android Studio and restarted it and it worked.
File -> Settings -> Plugin and then just press ok. It will ask to restart the android studio and please restart it.
For me I had to uncheck the plugin Android APK Support. I clicked Apply and then Ok to close the window. Android Studio prompted me to restart the program, and the program restarted. I checked the Android APK Support plugin again and restarted the program. And then I selected File -> Sync Project with Gradle Files
Then it worked just fine.

Resources