我正在开发一个 React Native 应用程序。我的 Android 构建在 CI 环境(和本地)中开始失败,没有任何更改。
Execution failed for task ':app:processDevelopmentDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
.../app/build/intermediates/incremental/mergeDevelopmentDebugResources/merged.dir/values/values.xml:2682: AAPT: error: resource android:attr/lStar not found.
根据 [Android: Resource linking fails on test execution even when nothing has been changed](https://stackoverflow.com/questions/69019631/android-resource-linking-fails-on-test-execution-even-when-nothing-has-been-cha)
,这是因为某些库升级了。
lStar 需要 compileSdkVersion 31 而我的项目使用了 compileSdkVersion 28。
如何跟踪最近更新了哪些库,或者哪个库导致了这种情况?
problem
是@react-native-community/netinfo
。只需尝试使用更新包或者
无需对 Gradle 或 Android 文件进行任何更改,因为这些可能会使事情变得更糟。