Well, I'm not sure if this is a real "solution", but here is my theory and what I did:
My theory
After updating the version of "Android Support Library" version 21, I received a similar error. It seems that my IntelliJ did not update the resources in my module correctly by pointing to the ressources directory for appcompat.
In addition, I had some widgets and code that directly pointed to drawings in these resources.
But in v21, the Android support library, Google turned off Holo ! Theme support
Therefore, the compiler complains that it will not find the resources on which my topic depends.
What I've done
When it is compiled
Honestly, I'm not quite sure how I got to this job. I think I used reloading and flushing the cache, etc. Copying resources to my project folder, etc. When my application finally started, it looked different! Of course, he had a Material Theme instead of a Holo.
And not everyone survived this transition. For instance. the action bar was black (standard) and not green (my theme). So I tried to revert to the old version of appcompat instead of porting my entire application to Material.
Since you asked me about my decision, I am posting what I did to “downgrade” to appomppat v20.
Upgrade to appcompat v20
- Launch SDK Manager
- Download Android Support Repository
- Go to the directory \ android-sdk \ extras \ android \ m2repository \ com \ android \ support \ appcompat-v7 \ 20.0.0 \ where the Android SDK is installed
- Extract all the files from
appcompat-v7-20.0.0.aar (this is a zip file) to the libs\appcompat\ in my project after creating the appcompat directory - Added this as a module in my IntelliJ and made my project depend on this module
- Restored
android-support-v7-appcompat.jar for v20 from my git repository - Used a restored jar of appcompat instead of v21 one
Step 6 is one that is very difficult for me. I expected the classes.jar from the .aar file to be android-support-v7-appcompat.jar , but that is not the case. I don’t even know where you can get android-support-v7-appcompat.jar from the correct version, because I did not find it in the repository. And I did not want to download it from "somewhere on the Internet."
I was lucky it was already in my git in the correct version.
Now my application is compiled and looks right. Hope is so yours!