android - uiautomatorviewer giving java main class error -
hi trying open uiautomatorviewer after installing androidsdk-uiautomatorviewer in ubuntu 14.04
everytime trying open uiautomator viewer getting following error.
root@xxxxxxx-hp-z400-workstation:/home/xxxxx# uiautomatorviewer exception in thread "main" java.lang.noclassdeffounderror: org/eclipse/jface/window/applicationwindow @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclasscond(classloader.java:631) @ java.lang.classloader.defineclass(classloader.java:615) @ java.security.secureclassloader.defineclass(secureclassloader.java:141) @ java.net.urlclassloader.defineclass(urlclassloader.java:283) @ java.net.urlclassloader.access$000(urlclassloader.java:58) @ java.net.urlclassloader$1.run(urlclassloader.java:197) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ sun.misc.launcher$extclassloader.findclass(launcher.java:229) @ java.lang.classloader.loadclass(classloader.java:306) @ java.lang.classloader.loadclass(classloader.java:295) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) caused by: java.lang.classnotfoundexception: org.eclipse.jface.window.applicationwindow @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ sun.misc.launcher$extclassloader.findclass(launcher.java:229) @ java.lang.classloader.loadclass(classloader.java:306) @ java.lang.classloader.loadclass(classloader.java:247) ... 14 more not find main class: com.android.uiautomator.uiautomatorviewer. program exit.
i dint understand why this? have set path sdk tools , platform-tools. please me out of it.
to fix it, modify /usr/bin/uiautomatorviewer
patch:
--- /usr/bin/uiautomatorviewer.ori 2015-03-31 12:23:52.307244926 +0200 +++ /usr/bin/uiautomatorviewer 2015-03-31 12:28:19.849396991 +0200 @@ -74,5 +74,6 @@ done jarpath="$frameworkdir/$jarfile" +deps="$frameworkdir:/usr/lib/eclipse/plugins" -exec "${javacmd}" $javaopts -djava.ext.dirs="$frameworkdir" -dcom.android.uiautomator.bindir="$progdir" -jar "$jarpath" "$@" +exec "${javacmd}" $javaopts -djava.ext.dirs="$deps" -dcom.android.uiautomator.bindir="$progdir" -jar "$jarpath" "$@"
i reported bug here: https://bugs.launchpad.net/ubuntu/+source/androidsdk-tools/+bug/1438629
edit: or better:
sudo ln -s ../../lib/eclipse/plugins/org.eclipse.jface_3.8.0.dist.jar /usr/share/java sudo ln -s ../../lib/eclipse/plugins/org.eclipse.core.commands_3.6.1.dist.jar /usr/share/java
Comments
Post a Comment