编译语言res文件时出现AAPT错误



在更新之前,我构建的应用程序一直运行良好,之后我的所有应用程序都在某些方面显示此错误,例如错误表明

C:UsersINS5567DocumentsCleanOnDemandappbuildintermediatesincrementalmergeDebugResourcesmerged.dirvalues-watch-v21values-watch-v21.xml: AAPT: error: file failed to compile.

大多数与语言相关的文件都显示出相同的错误,如

C:UsersINS5567DocumentsCleanOnDemandappbuildintermediatesincrementalmergeDebugResourcesmerged.dirvalues-watch-v20values-watch-v20.xml: AAPT: error: file failed to compile.

build.gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "org.wazir.build.cleanondemand"
minSdkVersion 20
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
// Firebase plugin
implementation 'com.google.firebase:firebase-analytics:17.2.1'
// managing multi dex files
def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"
// dependency for sticky switch
implementation 'com.github.GwonHyeok:StickySwitch:0.0.15'
// recyclerview dependency
implementation 'com.android.support:recyclerview-v7:28.0.0'
// cardview
implementation 'com.android.support:cardview-v7:28.0.0'

// picaso files
implementation 'com.squareup.picasso:picasso:2.71828'
// circular ImageView
implementation 'com.mikhaellopez:circularimageview:4.0.2'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-storage:19.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//here is the navigation dependency
implementation 'com.google.android.material:material:1.0.0'
}
apply plugin: 'com.google.gms.google-services'

这是许多类似文件中显示的错误

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
<string msgid="7903180715631665059" name="abc_action_bar_home_description">"Navegar para a página inicial"</string>
<string msgid="6794660482873516081" name="abc_action_bar_up_description">"Navegar para cima"</string>
<string msgid="1155814932213556626" name="abc_action_menu_overflow_description">"Mais opções"</string>
<string msgid="2571498368472823490" name="abc_action_mode_done">"Concluído"</string>
<string msgid="3732416590524162402" name="abc_activity_chooser_view_see_all">"Ver tudo"</string>
<string msgid="1798588241954930982" name="abc_activitychooserview_choose_application">"Selecionar um app"</string>
<string msgid="3403923230105792483" name="abc_capital_off">"DESATIVADO"</string>
<string msgid="7831734969929204599" name="abc_capital_on">"ATIVADO"</string>
<string msgid="5725160506500770567" name="abc_menu_alt_shortcut_label">"Alt+"</string>
<string msgid="944415252197684443" name="abc_menu_ctrl_shortcut_label">"Ctrl+"</string>
<string msgid="129742188101734366" name="abc_menu_delete_shortcut_label">"delete"</string>
<string msgid="6840127756824236027" name="abc_menu_enter_shortcut_label">"enter"</string>
<string msgid="4974283687810130415" name="abc_menu_function_shortcut_label">"Function+"</string>
<string msgid="8046416353848716905" name="abc_menu_meta_shortcut_label">"Meta+"</string>
<string msgid="3271697756921353410" name="abc_menu_shift_shortcut_label">"Shift+"</string>
<string msgid="2304645930658438191" name="abc_menu_space_shortcut_label">"espaço"</string>
<string msgid="8327365089695024394" name="abc_menu_sym_shortcut_label">"Sym+"</string>
<string msgid="3570106412128999382" name="abc_prepend_shortcut_label">"Menu+"</string>
<string msgid="940844115270746197" name="abc_search_hint">"Pesquisar…"</string>
<string msgid="1769270744562318534" name="abc_searchview_description_clear">"Limpar consulta"</string>
<string msgid="908784302972860853" name="abc_searchview_description_query">"Consulta de pesquisa"</string>
<string msgid="5466662225065974044" name="abc_searchview_description_search">"Pesquisar"</string>
<string msgid="8203855622131699655" name="abc_searchview_description_submit">"Enviar consulta"</string>
<string msgid="3478748990613108725" name="abc_searchview_description_voice">"Pesquisa por voz"</string>
<string msgid="2650565705514630347" name="abc_shareactionprovider_share_with">"Compartilhar com"</string>
<string msgid="9009661856846212431" name="abc_shareactionprovider_share_with_application">"Compartilhar com <ns1:g id="APPLICATION_NAME">%s</ns1:g>"</string>
<string msgid="6389460216547290468" name="abc_toolbar_collapse_description">"Recolher"</string>
<string msgid="730395136688082741" name="search_menu_title">"Pesquisar"</string>
<string msgid="8106346172024741305" name="status_bar_notification_info_overflow">"999+"</string>
</resources>

我不知道是什么原因导致这个错误

gradle更新到项目和应用程序级别的最新版本,然后使缓存无效并重新启动。这对我很有效。以下是我得到的答案:如何修复eror app\build\intermediates\res\merged\debug\values-v24\values-v44.xml

最新更新