0

Sorry if this is the wrong Stack Exchange, but this is where most of the questions were asked when I googled my problem.

For some time now I've been having problems with Android Studio and the AVD/SDK. It seems to be a relatively common problem, but I haven't been able to fix my problem with any of the solutions that worked for everyone else. This is the error I'm getting whenever I try and run the AVD or the SDK:

Cannot launch AVD manager.
Output:

Access is denied.

ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
  http://www.oracle.com/technetwork/java/javase/downloads

If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.

You can find the complete Android SDK requirements here:
  http://developer.android.com/sdk/requirements.html

I've tried re-installing everything Java (Both JRE and JDK), reinstalling Android Studio, running as admin, configuring permissions and a bunch of other stuff. I'm running Windows 7 and I've tried both JDK/JRE 6, 7 and 8 (JDK 6 worked very poorly though). I don't really know what kind of information you need to help me solve this problem, but I'll supply any information needed as fast as I can. Thank you very much.

Edit: Please note that Java IS installed. Both Java and Javac is working fine in cmd.

TumbaBit
  • 117
  • 2
  • 12

4 Answers4

0

I can suggest that Go to Windows -> Preference -> Java -> Compiler And try with different java version.

Pankaj Goyal
  • 950
  • 9
  • 15
0

Probably your Java folders are in the path (and that's why they work from CMD) but your JAVA_HOME is not defined.

As you are on Windows try creating a System Variable following those steps

Community
  • 1
  • 1
enTropy
  • 621
  • 4
  • 14
  • I have a JAVA_HOME variable and it's set to this: `C:\Program Files\Java\jdk1.7.0_60` – TumbaBit Jun 11 '14 at 09:31
  • In that case... If you go to Project Structure -> SDKs does Your Java version appear there? Does it show any errors when you select it? – enTropy Jun 11 '14 at 09:43
0

Try (re)installing the ADT and see if it works. If not, go to the sdk's root folder ([PATH TO THE UNZIPPED ADT]/sdk) and open the AVD Manager.exe. Does it still give you the same error? If not, try to open the SDK Manager.exe and make sure you've installed all the propper APIs. I'd recommend installing at least the SDK Tools and Platfom-tools, and all of API19 (Android 4.4.2).

LukasFT
  • 164
  • 2
  • 10
  • The only `AVD Manager.exe` I have is in `[PATH TO THE UNZIPPED ADT]\sdk\tools\lib`. Running that gave me [this error](http://puu.sh/9p0ie/00189fca1b.png). – TumbaBit Jun 11 '14 at 16:41
  • Also, even opening the ADT bundle is a problem since it's giving me the same 'Access Denied' error I've seen so many times now. I'm beginning to suspect this has something to do with my Java and not Android Studio. – TumbaBit Jun 11 '14 at 16:47
0

Finally Solved my problem! Some software I had previously installed had created a Path in User Variables, which was the one I was using for my JDK path. I tried using the Path in System Variables and it worked just fine! Thanks to everyone who took time to help me.

TumbaBit
  • 117
  • 2
  • 12