Reputation: 201
I reinstalled Android Studio, because one of my drives crashed. After the installation I tried to build my project, I got some strange errors:
C:\Users\woors\.gradle\caches\transforms-1\files-1.1\appcompat-v7-
27.0.2.aar\c3f1a01ea2c7c2b45168cff946884206\res\values\values.xml
Error:error: resource layout/abc_alert_dialog_material (aka com.tomade.saufomat:layout/abc_alert_dialog_material) not found.
Error:error: resource layout/abc_select_dialog_material (aka com.tomade.saufomat:layout/abc_select_dialog_material) not found.
Error:error: resource layout/select_dialog_item_material (aka com.tomade.saufomat:layout/select_dialog_item_material) not found.
Error:error: resource layout/select_dialog_multichoice_material (aka com.tomade.saufomat:layout/select_dialog_multichoice_material) not found.
Error:error: resource layout/select_dialog_singlechoice_material (aka com.tomade.saufomat:layout/select_dialog_singlechoice_material) not found.
Error:error: resource anim/abc_popup_enter (aka com.tomade.saufomat:anim/abc_popup_enter) not found.
Error:error: resource anim/abc_popup_exit (aka com.tomade.saufomat:anim/abc_popup_exit) not found.
Error:error: resource anim/abc_grow_fade_in_from_bottom (aka com.tomade.saufomat:anim/abc_grow_fade_in_from_bottom) not found.
Error:error: resource anim/abc_shrink_fade_out_from_bottom (aka com.tomade.saufomat:anim/abc_shrink_fade_out_from_bottom) not found.
Error:error: resource anim/tooltip_enter (aka com.tomade.saufomat:anim/tooltip_enter) not found.
Error:error: resource anim/tooltip_exit (aka com.tomade.saufomat:anim/tooltip_exit) not found.
Error:error: resource color/abc_btn_colored_borderless_text_material (aka com.tomade.saufomat:color/abc_btn_colored_borderless_text_material) not found.
Error:error: resource color/abc_btn_colored_text_material (aka com.tomade.saufomat:color/abc_btn_colored_text_material) not found.
Error:error: resource drawable/abc_list_selector_holo_dark (aka com.tomade.saufomat:drawable/abc_list_selector_holo_dark) not found.
Error:error: resource color/abc_background_cache_hint_selector_material_dark (aka com.tomade.saufomat:color/abc_background_cache_hint_selector_material_dark) not found.
Error:error: resource color/abc_primary_text_material_dark (aka com.tomade.saufomat:color/abc_primary_text_material_dark) not found.
Error:error: resource color/abc_primary_text_material_light (aka com.tomade.saufomat:color/abc_primary_text_material_light) not found.
Error:error: resource color/abc_primary_text_disable_only_material_dark (aka com.tomade.saufomat:color/abc_primary_text_disable_only_material_dark) not found.
Error:error: resource color/abc_secondary_text_material_dark (aka com.tomade.saufomat:color/abc_secondary_text_material_dark) not found.
Error:error: resource color/abc_secondary_text_material_light (aka com.tomade.saufomat:color/abc_secondary_text_material_light) not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
I cleaned my cache and tried to build again, but I get the same errors. Has anyone experiences with this error?
UPDATE:
If I delete the file
\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
the error is gone. But just for a few minutes. Then I have to delete the file again.
And everytime I start Android Studio I have to reselect my SDK.
These Errors are really strange.
Upvotes: 1
Views: 1203
Reputation: 29794
This is because you have different version of CompileSdkVersion
, buildToolsVersion
, targetSdkVersion
, and support library. You need to use the same version for them. In your case, you need to use version 27. Something like this:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
// ...
}
//...
}
dependencies {
// ...
implementation 'com.android.support:appcompat-v7:27.1.0'
}
Upvotes: 1