Android Studio error when clicking on Android device monitor

后端 未结 7 957
庸人自扰
庸人自扰 2021-02-04 08:51

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

---------------------------
Monitor
---------------------------
An error has         


        
相关标签:
7条回答
  • 2021-02-04 09:18

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

    0 讨论(0)
  • 2021-02-04 09:19

    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

    0 讨论(0)
  • 2021-02-04 09:21

    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.

    0 讨论(0)
  • 2021-02-04 09:24

    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.

    0 讨论(0)
  • 2021-02-04 09:24

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

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

    0 讨论(0)
  • 2021-02-04 09:26

    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.
    
    0 讨论(0)
提交回复
热议问题