The compile exception occers in mergeDebugResources.
I can’t solve the compile failure, What is happen?
It seems that it occurred when I changed the color code in the XML file.
CleanUp Project, Rebuild, Invalidate caches clear were no effect.
The cause seems to be values.xml. generated in compilation.
\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml
Build log are below
----Build Log : Run with --scan to get full insights.—
Executing tasks: [:app:assembleDebug] in project C:\Users\masao\AndroidStudioProjects\AnywhereButton
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:dataBindingMergeDependencyArtifactsDebug
Task :app:dataBindingMergeGenClassesDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:packageDebugResources
Task :app:generateDebugBuildConfig
Task :app:parseDebugLocalResources
Task :app:mergeDebugResources FAILED
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:checkDebugAarMetadata
Task :app:processDebugMainManifest
Task :app:processDebugManifest
Task :app:javaPreCompileDebug
Task :app:mergeDebugShaders
Task :app:compileDebugShaders NO-SOURCE
Task :app:generateDebugAssets UP-TO-DATE
Task :app:mergeDebugAssets
Task :app:compressDebugAssets
Task :app:processDebugJavaRes NO-SOURCE
Task :app:configureCMakeDebug[arm64-v8a]
Task :app:checkDebugDuplicateClasses
Task :app:buildCMakeDebug[arm64-v8a]
Task :app:configureCMakeDebug[armeabi-v7a]
Task :app:mergeLibDexDebug
Task :app:buildCMakeDebug[armeabi-v7a]
Task :app:configureCMakeDebug[x86]
Task :app:buildCMakeDebug[x86]
Task :app:configureCMakeDebug[x86_64]
Task :app:buildCMakeDebug[x86_64]
Task :app:externalNativeBuildDebug
Task :app:mergeDebugJniLibFolders
Task :app:mergeDebugNativeLibs
Task :app:validateSigningDebug
Task :app:stripDebugDebugSymbols
Task :app:writeDebugAppMetadata
Task :app:writeDebugSigningConfigVersions
Task :app:processDebugManifestForPackage
Task :app:desugarDebugFileDependencies
Task :app:mergeExtDexDebug
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:mergeDebugResources’.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed (Failed to compile values resource file C:\Users\masao\AndroidStudioProjects\AnywhereButton\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml. Cause: java.lang.NullPointerException). Check logs for more details.
- 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 12s
36 actionable tasks: 36 executed
The build scan was not published due to a configuration problem.
The Gradle Terms of Service have not been agreed to.
For more information, please see Gradle Enterprise Gradle Plugin User Manual | Gradle Enterprise Docs.
Alternatively, if you are using Gradle Enterprise, specify the server location.
For more information, please see Gradle Enterprise Gradle Plugin User Manual | Gradle Enterprise Docs.
— Build log : Run with --info —
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:mergeDebugResources’.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed (Failed to compile values resource file C:\Users\masao\AndroidStudioProjects\AnywhereButton\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml. Cause: java.lang.NullPointerException). Check logs for more details.
- Try:
Run with --stacktrace option to get the stack trace.
Run with --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 10s
36 actionable tasks: 36 executed
Watched directory hierarchies: [C:\Users\masao\AndroidStudioProjects\AnywhereButton]