【发布时间】:2021-12-27 07:38:40
【问题描述】:
我尝试构建发布 apk,但出现此错误。我检查了文件。它存在!
* What went wrong:
Execution failed for task ':react-native-agconnect-remoteconfig:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: /Users/xxx/com.xxx.xxx/node_modules/@react-native-agconnect/remoteconfig/android/build/intermediates/res/merged/release/layout/abc_alert_dialog_button_bar_material.xml: error: file not found.
我的尝试:
在 android/build.gradle 中添加以下代码:
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
}
}
}
}
我该如何解决这个问题?
【问题讨论】:
-
hi@Emre D,您能否尝试清除项目并重新编译以查看问题是否仍然存在?
标签: android react-native huawei-mobile-services appgallery-connect