Types not resolved after import in Eclipse ("indirectly referenced from required .class files") #5

cernier opened this Issue Sep 9, 2012 · 11 comments


None yet
5 participants

cernier commented Sep 9, 2012


Just to know if I'm the only one to face this problem:

  • The build is completely working fine within Maven
  • But, if I import android-bootstrap in my Eclipse (incl. plugins for ADT, git, Maven and its connectors) there are a lot of errors.
  • More strangely I can see only those 4 errors in the "Problems" view
Description Resource    Path    Location    Type
/android-bootstrap/gen already exists but is not a source folder. Convert to a source folder or rename it.  android-bootstrap       line 1  Android ADT Problem
The project was not built since its build path is incomplete. Cannot find the class file for com.actionbarsherlock.app.SherlockFragment. Fix the build path then try building this project  android-bootstrap       Unknown Java Problem
The type com.actionbarsherlock.app.SherlockFragment cannot be resolved. It is indirectly referenced from required .class files  UserListFragment.java   /android-bootstrap/src/main/java/com/donnfelker/android/bootstrap/ui    line 46 Java Problem
dependency=[com.actionbarsherlock:library:apklib:4.1.0:compile] not found in workspace  pom.xml /android-bootstrap  line 1  me.gladwell.eclipse.m2e.android.markers.dependency.apklib
  • But if I open .java files, not only the UserListFragment.java contains a lot of errors with red markers (the same kind of errors with the message "indirectly referenced from required .class files"), which is not very practical to code.

After facing this behaviour on Indigo, I even tried in Juno RC3 and I got the same errors.

Any of you with an idea of what's wrong ?

Thanks in advance


donnfelker commented Sep 9, 2012

**** commented removed as it was a cross poste from another site that accidentally posted to the wrong forum .. this one *****

cernier commented Sep 9, 2012

I'm sorry but I don't get the relation between my question and custom Android ROMs ; neither what you mean by "that feature" ?


donnfelker commented Sep 10, 2012

Sorry! Wrong email. Somehow my reply got mixed up with another android list
I participate in.

I'll reply to your question shortly.

On Sep 9, 2012 2:17 PM, "cernier" notifications@github.com wrote:

I'm sorry but I don't get the relation between my question and custom
Android ROMs ; neither what you mean by "that feature" ?

Reply to this email directly or view it on GitHubhttps://github.com/donnfelker/android-bootstrap/issues/5#issuecomment-8409433.


donnfelker commented Sep 12, 2012

Did you install the m2e plugin and the m2e-android plugin so you can open maven projects in Eclipse with android?


richardwiden commented Sep 14, 2012

From what I have been able to gather eclipse+maven+android-library-projects is just plain broken at this time.

I have not got it working but apparently you have to manually import the projects and mavenify them for it to work. That means you have to download the source for actionbarsherlock and place it in your work-space with the included pom.xml.

Google "dependency=[com.actionbarsherlock:library:apklib:4.1.0:compile] not found in workspace" and someone more knowledgeable than me on the subject might be able to actually tell what is going on. I´ve never used maven so it's hard to tell what is actually important and what information is deprecated.


donnfelker commented Sep 14, 2012

This seems like a royal PITA to use eclipse with Maven right now
(unfortunately). I apologize for that, however .... I highly recommend you
diverge from Eclipse and go with IntelliJ (free community edition works
fine). Install it, the file open project, chose the pom and then enable
auto importing on intelliJ. Boom, you're ready to go. Once I get some time
I'll try to look into the eclipse stuff, but it definitely will not be this

We have been using it on a Maven project for a while and so far the only consistent way is to get it to execute is via command line (or run configuration in Eclipse). IntelliJ really is much better at handling maven and for anyone getting started I would suggest that. I'm stubborn so I still use Eclipse.

Maven/Eclipse is mostly broken as in you will have to import any libraries you need directly. They are working at cleaning up the maven-android apklibs but it doesn't really work that well. I would suggest skipping to look at it until the maven-android apklibs problem is solved. You'll just be spinning your wheels

cernier commented Sep 21, 2012


Indeed with IntelliJ, it's working far better.
But running the maven goals (clean, install, android:deploy, etc...) from the Maven panel.

On the other hand, if I try to call the "general-purpose" "Make" of IntelliJ I have compilation errors.
Do you face the same issue ? Or, like me, you are using only the Maven panel of IntelliJ ?


donnfelker commented Sep 21, 2012

I use a maven run configuration. I set the working directory to the
/path/to/android-bootstrap/app/ folder and then use the following as the
command: clean package android:deploy android:run

If I go to the app/ directory and do mvn eclipse:eclipse, it seems to almost work.

The resulting project can then be loaded/edited in Eclipse. However, there are some slight issues:

  • ActionbarSherlock doesn't seem to be included. I get this from res/values/theme.xml

    No resource found that matches the given name '.Sherlock'.
    No resource found that matches the given name 'Widget.Sherlock.ActionBar.Solid'.
    No resource found that matches the given name: attr 'absForceOverflow'.
    No resource found that matches the given name: attr 'actionBarStyle'.
    No resource found that matches the given name: attr 'background'.

I've tried editing the .classpath and pointing it to M2_REPO/com/actionbarsherlock/library/4.1.0/library-4.1.0.jar, but no luck.

  • If I open ActionbarSherlock library and add as an Android library, then the theme.xml errors go away, but I get errors in the res/layout/carousel_view.xml in com.viewpagerindicator.TitlePageIndicator.

Any ideas?


donnfelker commented Apr 5, 2014

Closing as we're now using Android Studio and gradle

donnfelker closed this Apr 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment