# \[HELP!\]I can't solve the compile failure

**URL:** <https://discuss.gradle.org/t/help-i-cant-solve-the-compile-failure/44732>\
**Category:** Help/Discuss\
**Created:** [January 25, 2023, 2:44pm UTC](https://discuss.gradle.org/t/help-i-cant-solve-the-compile-failure/44732 "2023-01-25T14:44:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masa](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Masa](https://discuss.gradle.org/u/Masa)\
**Post date:** [January 25, 2023, 2:44pm UTC](https://discuss.gradle.org/t/help-i-cant-solve-the-compile-failure/44732/1 "2023-01-25T14:44:21Z")

</div>

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](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](https://gradle.com/help/plugin-terms-of-service).

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](https://gradle.com/help/plugin-enterprise-config).

— 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](https://help.gradle.org)

BUILD FAILED in 10s  
36 actionable tasks: 36 executed  
Watched directory hierarchies: [C:\Users\masao\AndroidStudioProjects\AnywhereButton]

---

<div class="post-metadata">

**Author:** ![Masa](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Masa](https://discuss.gradle.org/u/Masa)\
**Post date:** [January 25, 2023, 5:17pm UTC](https://discuss.gradle.org/t/help-i-cant-solve-the-compile-failure/44732/2 "2023-01-25T17:17:25Z")

</div>

This compile exception has solved.  
The reason was the word in item-tag of the arrays.xml included the character apostrophe.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [January 26, 2023, 1:31am UTC](https://discuss.gradle.org/t/help-i-cant-solve-the-compile-failure/44732/3 "2023-01-26T01:31:52Z")

</div>

As this is a Gradle forum and your problem was not Gradle related, I’d like to suggest to ask similar questions in some Android community next time.  
If you have an actual Gradle problem, feel free to open a new thread with it. 🙂
