All Things Techie With Huge, Unstructured, Intuitive Leaps
Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Javascript Evaluation Errors in Eclipse

I have a big huge app developed in Eclipse Juno.  The app has a lot of stuff including some jQuery and other javascript frameworks.  Every time that I do a build, I get errors in the Problems tab.  When I look at them, they are all errors that Eclipse says that I have in the Javascript libraries, yet they work fine.  So what to do?

The obvious thing is to turn off the javascript evaluation in Eclipse.  This is how you do it:


  1. Right click your project
  2. Select Properties -> JavaScript -> Include Path
  3. Select Source tab. ( It's identical to Java Build Path Source tab )
  4. Expand JavaScript source folder
  5. Highlight Excluded pattern
  6. Click Edit button
  7. Click Add button next to Exclusion patterns box. (You can either use Ant-style wildcard patterns or click Browse button to mention the JavaScript file by name).
Hope this helps someone.

Android Device Not Visible In Eclipse using USB cable



I wanted to connect a Galaxy Tablet by Samsung to my Eclipse Android SDK with the USB cable.  I downloaded the appropriate drivers, followed all of the instructions including setting the tablet in Application debug mode, and still nothing.  Nada! Zilch!  I thought that maybe I had the wrong driver, so I uninstalled the driver, went to the Samsung site, and got the driver again and installed it.  Nothing!  Crapola!

I have more than one Android app on the go, because the app that I am developing is quite complex, so I prototype each function as a separate project to make sure that I have the Java code right.  I went to another project and look at the run configs, and I could see the device in the run configuration menu.  It ran perfectly.  So, WTH?

After much wailing and gnashing of teeth, I decided to examine LogCat very closely.  It said it couldn't find a compatible minimum SDK version device attached.  Well, I did know where it was specified and that was in the AndroidManifest.xml.  So I went there and sure enough, I had accidentally changed the minSdkVersion to 17, instead of 8.  The 17 number was for the targetSdkVersion.


<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

When I changed the minSdkVersion back to 8, I could see the USB connected device.

Hope this helps someone.

Eclipse Java -- Classes Will Not Build


We had an interesting problem.  After checking out the latest project out of our repository (Subversion), we couldn't get a build.  After a clean, the WEB-INF/classes directory was empty.  We checked the build path stuff under the project properties.  All was in order.  We rebuilt several times.  Nothing.

It turns out that somehow a corrupted .classpath file was checked into the main trunk.  This is the .classpath file automagically generated by Eclipse.  When we reverted to the previous version of the .classpath file, everything worked and we got a build.

Hope this helps someone.

Eclipse Tip -- Show Line Numbers

Here's a quick Eclipse IDE tip. I just reconfigured my Eclipse and I lost my line numbers. Couldn't remember how to do it. Took me awhile to find the answer. Here's how:

In the menu under "Windows", select "Preferences".

In the dialog box that opens up, you will see a tree view. Click on "General" to open it. Under "General" click on "Editors" and then click on "Text Editors". A dialog box opens to the right. Select the "Show Line Numbers" checkbox.

Easy as pie.