我不断收到此错误,但似乎无法解决。我的 xml 文件是正确的,没有格式/拼写问题。直到最近一切正常,我不知道是什么触发了它。主要错误似乎与“final_acaiathletica”有关,它是我的启动画面(直到今天仍然有效)。 其他信息:
compileSdkVersion 30
buildToolsVersion "30.0.3"
minSdkVersion 23
targetSdkVersion 30
__________
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
__________
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\drawable\\background_splash.xml","position":{"startLine":3}}],"original":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\drawable\\background_splash.xml:4: AAPT: error: resource drawable/ic_finalacaiathletica (aka com.example.acaiathletica:drawable/ic_finalacaiathletica) not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":25}}],"original":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\layout\\activity_main.xml:26: AAPT: error: resource drawable/bottom_nav_rounded (aka com.example.acaiathletica:drawable/bottom_nav_rounded) not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\menu\\bottom_navigation.xml","position":{"startLine":3}}],"original":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\menu\\bottom_navigation.xml:4: AAPT: error: resource drawable/ic_workouts (aka com.example.acaiathletica:drawable/ic_workouts) not found.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\menu\\bottom_navigation.xml","position":{"startLine":8}}],"original":"C:\\Users\\Me\\AndroidStudioProjects\\AcaiAthletica\\app\\src\\main\\res\\menu\\bottom_navigation.xml:9: AAPT: error: resource drawable/ic_saved (aka com.example.acaiathletica:drawable/ic_saved) not found.\n ","tool":"AAPT"}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\Me\AndroidStudioProjects\AcaiAthletica\app\src\main\res\drawable\background_splash.xml:4: AAPT: error: resource drawable/ic_finalacaiathletica (aka com.example.acaiathletica:drawable/ic_finalacaiathletica) not found.
C:\Users\Me\AndroidStudioProjects\AcaiAthletica\app\src\main\res\layout\activity_main.xml:26: AAPT: error: resource drawable/bottom_nav_rounded (aka com.example.acaiathletica:drawable/bottom_nav_rounded) not found.
C:\Users\Me\AndroidStudioProjects\AcaiAthletica\app\src\main\res\menu\bottom_navigation.xml:4: AAPT: error: resource drawable/ic_workouts (aka com.example.acaiathletica:drawable/ic_workouts) not found.
C:\Users\Me\AndroidStudioProjects\AcaiAthletica\app\src\main\res\menu\bottom_navigation.xml:9: AAPT: error: resource drawable/ic_saved (aka com.example.acaiathletica:drawable/ic_saved) not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
11 actionable tasks: 1 executed, 10 up-to-date