Android device monitor does not open

I can not start Android Monitor. I am using Android Studio. Not eclipse.

  • When I try to open it in the terminal using sudo./monitor, I see the following warning, then it shows

WARNING: Illegal operation with reflective access has occurred WARNING: Illegal reflective access org.eclipse.osgi.internal.baseadaptor.BaseStorage (File: / Users / kidus11 / Library / Android / sdk / tools / lib / monitor-x86_64 / plugins / org. eclipse.osgi_3.8.2.v20130124-134944.jar) to the java.net.URLClassLoader.addURL method (java.net.URL) WARNING: Please think about this to report this to org.eclipse.osgi.internal.baseadaptor.BaseStorage WARNING: use Warning: all illegal operations are refused a future release

  • I have a version of Java 9 as well as Javac 9
  • I installed the latest version of JDK or JRE

Here is the tag that I see every time I try to open Android Device Monitor

! ENTRY org.eclipse.osgi 4 0 2017-10-04 20: 18: 12.531! MESSAGE Application Error! STACK 1 java.lang.IllegalStateException: Unable to complete acquiring application service. Make sure that the org.eclipse.core.runtime package is enabled and running (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.javahaps53) in org.eclipse. .runtime.adaptor.EclipseStarter.run (EclipseStarter.java:180) in java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) with java.base / jdk.internal.reflect.NativeMethodAccessorplplodccessplplplootPlayer java: 62) in java.base / jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) in java.base / java.lang.reflect.Method.invoke (Method.java UP64) in org.eclipse .equinox.launcher.Main.invokeFramework (Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun (Main.java∗84) at org.eclipse.equinox.launcher.Main.run (Main.java : 1438)

Any help would be greatly appreciated!

+1
source share
5 answers

Android Studio does not yet support Java 9. Install JDK 8 and update your studio configurations to specify jre for 8.

Then make sure you are not setting your JAVA_HOME to 9. Finally, make sure that you are not running the eclipse somewhere on your machine that already owns ADB.

+6
source

Yes, the new Android Studio Bundle comes with its own JRE (under C:\Program Files\Android\Android Studio\jre ).

So you can just copy this jre folder and paste it here: C:\Users\<Username>\AppData\Local\Android\Sdk\tools\lib\monitor-x86_64

And now in the Android studio, select Tools → Android → Android Device Monitor.

Or you may prefer this link. Fix Android monitor problem.

+2
source

The new Android Studio Bundle comes with its own JRE (under <ANDROID_STUDIO>/jre , and this is the recommended JRE to work with (look at the file / project structure / SDK location).

Similarly, a simple option is to create a symbolic link under the monitor tools so that the JRE matches Android Studio, even if you receive an update.

For MAC or Linux:

 #ln -s <ANDROID_STUDIO>/jre <SDK>/tools/lib/monitor-x86_64/jre 

32 bit:

 #ln -s <ANDROID_STUDIO>/jre <SDK>/tools/lib/monitor-x86/jre 

Then the ddms monitor works in both directions: from the Studio IDE (Tools / Android / ADM) or on the command line ( <SDK>tools/./monitor )

+1
source

Not sure what you are using for Android Device Monitor, but apparently with Android Studio 3.0. Most Android Device Monitor components are out of date:

https://developer.android.com/studio/profile/monitor.html

There are other tools that you can use, such as Android Profiler ...

Therefore, perhaps you should not try to fix this problem.

+1
source

You are modifying the Info.plist file in the binary directory of the monitor.

 Path example in Mac: /Users/{username}/Library/Android/sdk/tools/lib/monitor.app/Contents/Info.plist 

Add the -vm switch of the associated java path to <key>Eclipse</key><array> (there is a comment. You read it.)

 -vm key example <string>-vm</string><string>/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/java</string> 
0
source

Source: https://habr.com/ru/post/1272075/


All Articles