DRnwl / android-projector

Automatically exported from code.google.com/p/android-projector
0 stars 0 forks source link

Java Error #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is what i get

C:\Program Files\Android\android-sdk\platform-tools>android-projector.bat
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/graph
ics/Device
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.graphics.Device
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 more
I had to place archquery.jar in the "lib" folder for this error to appear.

Original issue reported on code.google.com by tylerwat...@gmail.com on 9 Oct 2011 at 1:56

GoogleCodeExporter commented 9 years ago
A little late, but my solution was to put the files in the android-sdk's 
tools-folder

Original comment by kuste...@gmail.com on 23 Mar 2012 at 10:21

GoogleCodeExporter commented 9 years ago
I first had the same problem. It vanished after I made a small script to invoke 
android-projector. I called it start-projector and its content is:

export 
PATH=$PATH:/home/tw/android-sdk-linux/platform-tools:/home/tw/android-sdk-linux/
tools
./android-projector

Of course you need to adapt the PATH so it matches your setup.

Also, I enabled USB-Debugging on the device and connected it via USB.

Original comment by Thomas.J...@gmail.com on 14 Jun 2012 at 7:08

GoogleCodeExporter commented 9 years ago
Basically the 'android-projector' shell script or bat script both using "which 
android" to determine where the Android SDK is installed at. 

In summary, the "android" command or "android.bat" need to be also part of the 
PATH.
Adding the following line to ~/.bash_profile - resolve the launch error above:

export 
PATH=$PATH:/Applications/android-sdk-macosx/platform-tools/:/Applications/androi
d-sdk-macosx/tools

* replace the android sdk path with your own path

Original comment by garys...@gmail.com on 19 Jun 2012 at 6:58