Android projects cannot be built because ActionBarActivity cannot resolve to types
I’m following the training on the developer.android.com website and I failed when I got to the “Build your first app/start another activity” section :
I’ve added the android-support-v7-appcompat library based on the description of this site: http://developer.android.com/tools/support-library/setup.html#libs-with-res
Where I select the library for the android project (
Project Properties/Android/Library), I click the Add button, select the project library (first image), and then the project does not build after I press OK.
Before (everything works fine)
Afterwards.
Before all this… I was able to somehow build the project, press play, but unfortunately it stopped (crashed) on my device immediately after launching. The console says:
[2014-07-23 15:06:45 - android-support-v7-appcompat] Could not find android-support-v7-appcompat.apk!
That’s the key to me starting to investigate the problem… But it didn’t work out.
My question is, why did I “deactivate” the library after I checked again?
Solution
The library project should be on the same drive as your workspace. The reference project is in the same Eclipse workspace as the library project.