Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio error when clicking on Android device monitor

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.

like image 281
kintaro Avatar asked Oct 16 '14 04:10

kintaro


People also ask

How can I see my device in Android Studio?

In Android Studio, select your app from the run/debug configurations drop-down menu in the toolbar. In the toolbar, select the device that you want to run your app on from the target device drop-down menu.

What is DDMS Android Studio?

Android Studio includes a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more.

Where is DDMS?

DDMS is accessible via Studio > Tools > Android > Android Device Monitor and clicking the DDMS button on menu. You can also place is as a shortcut icon (I do) in your upper panel.


4 Answers

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.

like image 95
Yaseen Avatar answered Oct 02 '22 11:10

Yaseen


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

like image 35
Haresh Chhelana Avatar answered Oct 02 '22 10:10

Haresh Chhelana


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

like image 45
Mifreitas10 Avatar answered Oct 02 '22 09:10

Mifreitas10


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".

like image 24
Qamar Avatar answered Oct 02 '22 11:10

Qamar