13

I am having this error in android studio whenever i click on Android Device Monitor:

---------------------------
Monitor
---------------------------
An error has occurred. See the log file
C:\Users\<user>\AppData\Local\Android\android-studio\sdk\tools\lib\monitor-x86_64\configuration\1413432754457.log.
---------------------------
Aceptar   
---------------------------

And the log file contains this:

!SESSION 2014-10-15 23:12:34.229 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_67
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_CO
Command-line arguments:  -os win32 -ws win32 -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2014-10-15 23:12:34.641
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Please help me, It doesn't open SDK Manager, Device Monitor and AVD Manager.

Anirudh Sharma
  • 7,968
  • 13
  • 40
  • 42
kintaro
  • 2,393
  • 2
  • 16
  • 16

7 Answers7

26

I am adding this answer because I think this will be helpful to future visitors.

I ran into the same problem, and managed to solve it. However, My solution is different from the one already mentioned.

First of all, the monitor.ini file is in C:\Users\\AppData\Local\Android\sdk\tools\lib\monitor-x86_64 and config.ini file is in ./configuration folder

When I checked log file it said (at the very end of file) :

java.io.IOException: The folder "C:\Users\.android\monitor-workspace.metadata" is read-only.

So I ran the monitor.exe as Administrator and it worked fine.

Next I ran Android Studio as Admin and the ADM button worked fine.

Yaseen
  • 1,348
  • 2
  • 16
  • 31
3

The config.ini file should specify org.eclipse.core.runtime@start in the osgi.bundles property. Here is the default osgi.bundles property, maybe it was (accidentally) changed during an upgrade:

You need to add the following line to the bottom of the eclipse.ini monitor.ini which is a configuration setting file located in your android-sdk\tools\lib\monitor-x86_64\ folder:

-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start

After that, run Android Device Monitor from the same folder where you have made changes instead from Android Studio and right click on monitor with eclipse icon>Run As Administrator

Ref : "Unable to acquire application service" error while launching Eclipse

Community
  • 1
  • 1
Haresh Chhelana
  • 24,720
  • 5
  • 57
  • 67
  • Sorry but I can not find the config.ini file and no where to look. Edit: Locate and found a config.ini file in the path C: \ Program Files \ Java \ jdk1.7.0_67 \ lib \ MissionControl \ configuration, add the line you indicate but did not work. – kintaro Oct 17 '14 at 03:29
1

Insert into search bar "monitor.exe" click up with the right mouse button and run as administrator.

1

Error log file saying ".android\monitor-workspace\.metadata" is read-only unable to acquire application service.
After the error I saw the folder created by Android studio is called C:\Users\FirstName%20LastName\.android\monitor-workspace\.metadata
The space in the user folder name is a problem.

Make new user account and copy .android and .AndroidStudio2.0 folder to the new user folder. Start Android Studio without "Run as Administrator".

Michael Innes
  • 2,045
  • 5
  • 25
  • 41
Qamar
  • 4,959
  • 1
  • 30
  • 49
0

The same eclipse.ini file will be located in Eclipse in this root path of eclipse itself like:

C:\Users\username\Downloads\adt-bundle-windows-x86_64-20140702\eclipse\eclipse.ini

The same file will be located in android studio project:-

C:\Users\username\AppData\Local\Android\sdk\tools\lib\monitor-x86_64\monitor(Type:Configuration settings)

Edit the file as you want.
anand krish
  • 4,281
  • 4
  • 44
  • 47
0

\android-sdks\tools\lib\monitor-x86_64\configuration\org.eclipse.osgi.manager

There exist .fileTableLock --> uncheck Read-only from properies

AMD
  • 1,662
  • 18
  • 39
0

I had the same error. For me the reason was in JDK version. Non of JDK7 or JDK9 worked for me. But after installing JDK8 ADM stared normally.

Andrei Vinogradov
  • 1,865
  • 15
  • 32