Error type:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Users\����\.gradle\caches\transforms-3\db8e08386f4a33568e0b38b14c743524\transformed\material-1.10.0-alpha01\res\values-v34\values-v34.xml:3:5-101:
AAPT: error: resource android:color/system_background_dark not found.
Description of the problem:
The code could run normally before, but suddenly an error was reported. After consulting the relevant information https://github.com/material-components/material-components-android/releases, I realized that this should be a gradle problem
modification Way:
- The compileSdkVersion and targetSdkVersion targetSdkVersion in build.gradle
are also upgraded to 33
2. Add android:exported="true" to the MainActivity tag in the AndroidManifest.xml file
3. The dependencies in 3.build.gradle also need to change
Summary:
When using Android Studio, the version of Gradle and the version of the library used in the project may change. If the Gradle version is updated or new libraries need to be added, the libraries must be resynced and downloaded.
To avoid these problems as much as possible, you need to keep the version of Gradle and the library up to date, and use Gradle's local cache to avoid downloading the library from the network every time.
Supplementary link:
official material-components