We've got a base project from University to build upon. So I installed Android Studio
, installed and updated the Android SDK (API 22) and the all the extras and opened the project, which has the appcompat-v7
library included under External Libraries.
When I'm trying to build the app I get the following error messages:
C:\PRIVAT\Universität Regensburg\SS-2015\Anwendungsprogrammierung-mit-Android\Studienleistungen\02-Studienleistung\FoodieAppStarterProject\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.0\res\layout\notification_media_cancel_action.xml
Error:(26, 18) No resource found that matches the given name (at 'src' with value '@drawable/abc_ic_clear_mtrl_alpha').
C:\PRIVAT\Universität Regensburg\SS-2015\Anwendungsprogrammierung-mit-Android\Studienleistungen\02-Studienleistung\FoodieAppStarterProject\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.0\res\drawable\abc_btn_check_material.xml
Error:(18, 58) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_btn_check_to_on_mtrl_015').
Error:(19, 29) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_btn_check_to_on_mtrl_000').
... and so on. I get lots and lots of these. And I have no idea why. Everything seems to be correct.
Can anyone help based on this.
As you can see here: https://developer.android.com/sdk/support_api_diff/23.2.0/changes/android.support.v7.appcompat.R.drawable.html
The drawable reference had been updated, so you need to update the variable name:
abc_ic_clear_mtrl_alpha -> abc_ic_clear_material
abc_btn_check_to_on_mtrl_015 -> abc_btn_checkbox_checked_mtrl
abc_btn_check_to_on_mtrl_000 -> abc_btn_checkbox_unchecked_mtrl
abc_ic_ab_back_mtrl_am_alpha -> abc_ic_ab_back_material
But, you should notice, if you use these resources on devices with API level <= 19. That will trigger an exception Resource Not Found
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With