13

Title, pretty much.

Normally there's an "Android" item in the "Tools" menu, which contains things like the Android SDK Manager. Since the whole Tools menu does not show up, I can't access the SDK Manager.

What controls if this submenu shows or not? How can I fix this?

brocoli
  • 542
  • 3
  • 16

5 Answers5

5

This happened for me because I had opened the wrong project folder. When opening your project folder in Android Studio, make sure you open the main, top-level folder of the Android project (the one containing build.gradle, gradle.properties, etc.). I had opened the folder above this one as part of a React Native project--when I closed and reopened the project from the android/ folder, the menu item reappeared and Gradle sync began working.

Lane Rettig
  • 6,640
  • 5
  • 42
  • 51
  • You may also want to press Configure if there's a balloon telling you Android framework detected. – Mygod Oct 28 '17 at 05:02
3

In the end all I needed to do was to clear the caches and restart everything.

  1. I deleted the ~/.gradle/ directory
  2. I then restarted AndroidStudio with the "File" > "Invalidate Caches / Restart..." menu item.

After this I started AndroidStudio and loaded the project again, and it worked.

EDIT: Since the update to Android Studio 3.0 this started happening again, and invalidating the caches stopped fixing the issue.

I tried everything I could, but in the end the only thing that worked was uninstalling everything Android-related, and then installing an old version of Android Studio.

EDIT2: I've been using Android Studio 3.1 Canary 5 since it came out, and did not have this problem with it since then. This suggests that the next stable release should have this fixed :/

brocoli
  • 542
  • 3
  • 16
  • There is another way to solve your problem. You can go back to Android Studio 3.0 and run your app successfully. Just move the app from the current folder and place it into a new fresh folder. Then open the app in Android Studio 3.0 and rebuild the gradle. It should fix the issue. See SO answer here https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil/37365254. This solution worked on the same probelm for mac High Sierra and Windows 10. – Val Mar 22 '18 at 03:18
  • @JnL I don't see how the SO question you linked to (SDK location not found) is relevant to this particular error... but could you post the first part of your comment as an answer anyway? It's something that could work depending on the problem that's causing the menu to fail to show up for some people. – brocoli Mar 22 '18 at 20:26
  • Were you importing the app from a version control? – Val Mar 24 '18 at 05:30
  • Yes, but again this wasn't relevant to the error happening in my machine in particular, since it consistently failed with Android Studio 3.0, but consistently worked with 2.x and with 3.1. There are many things that can cause the Android menu to fail to appear, including misconfiguration of the SDK location, but apparently there's some bug in Android Studio 3.0 specifically that can cause this for some projects too. – brocoli Mar 26 '18 at 14:35
1

I had this same problem when the gradle reported an error of not being able to find the Android SDK package. Since I could not locate the tools > Android > sync gradle option, I was unable to correct the issue. Although you did not get this gradle error, I'm confident the problem you are finding in the Tools menu can be solved in the same way.

You can go back to Android Studio 3.0 and run your app successfully on Mac or Windows. Just move the app folder from the current folder and place it into a new fresh folder. Then open the app in Android Studio 3.0 and rebuild the gradle. It should fix the issue for Tools > Android option not showing up. This solution worked on the same problem for Mac OSX High Sierra and Windows 10 systems.

Val
  • 1,260
  • 5
  • 23
  • 39
0

I had the same issue, I was working on a react native project and I opened the correct folder, containing the build.gradle, gradle.properties, etc and I didn't appear the Android menu on the Tools tab.

I had the following issue:

issue on Android project

My problem was that The Android SDK Platform wasn't installed so I installed and done! it solved my problem, I hope that work for you.

For me: I just clicked on the link to install it and that was all, but if for you doesn't work > find out.

Abraham
  • 8,525
  • 5
  • 47
  • 53
0

Go to Preferences->plugins. Uncheck the "firebase services" checkbox. click apply, ok. It will restart android studio.

You can go back and reenable the firebase plugin and SDK manager will stay.

This help resolve my issue and AndroidSDK was available after this.

CodeNinja
  • 19
  • 4